2020-07-16 04:36:29 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as Actions from "~/common/actions";
|
2021-04-19 22:30:11 +03:00
|
|
|
import * as Window from "~/common/window";
|
2020-07-28 09:54:15 +03:00
|
|
|
import * as Constants from "~/common/constants";
|
2020-07-16 04:36:29 +03:00
|
|
|
import * as System from "~/components/system";
|
2020-11-28 07:39:01 +03:00
|
|
|
import * as Events from "~/common/custom-events";
|
2023-01-21 18:57:58 +03:00
|
|
|
import * as SVG from "~/common/svg";
|
2020-07-16 04:36:29 +03:00
|
|
|
|
2020-11-30 08:24:22 +03:00
|
|
|
import { css } from "@emotion/react";
|
2023-01-17 19:03:09 +03:00
|
|
|
import { SecondaryTabGroup } from "~/components/core/TabGroup";
|
2023-01-21 18:57:58 +03:00
|
|
|
import { ConfirmationModal } from "~/components/core/ConfirmationModal";
|
2020-07-16 04:36:29 +03:00
|
|
|
|
|
|
|
import ScenePage from "~/components/core/ScenePage";
|
2020-08-22 07:25:34 +03:00
|
|
|
import ScenePageHeader from "~/components/core/ScenePageHeader";
|
2023-01-21 18:57:58 +03:00
|
|
|
import SquareButtonGray from "~/components/core/SquareButtonGray";
|
2020-07-16 04:36:29 +03:00
|
|
|
|
2021-04-20 04:07:19 +03:00
|
|
|
import APIDocsGetV1 from "~/components/api-docs/v1/get";
|
|
|
|
import APIDocsGetSlateV1 from "~/components/api-docs/v1/get-slate.js";
|
|
|
|
import APIDocsUpdateSlateV1 from "~/components/api-docs/v1/update-slate.js";
|
|
|
|
import APIDocsUploadToSlateV1 from "~/components/api-docs/v1/upload.js";
|
2021-03-22 21:17:42 +03:00
|
|
|
|
2021-04-21 03:14:43 +03:00
|
|
|
import APIDocsGetV2 from "~/components/api-docs/v2/get";
|
|
|
|
import APIDocsGetSlateV2 from "~/components/api-docs/v2/get-slate.js";
|
|
|
|
import APIDocsUpdateSlateV2 from "~/components/api-docs/v2/update-slate.js";
|
|
|
|
import APIDocsUpdateFileV2 from "~/components/api-docs/v2/update-file.js";
|
|
|
|
import APIDocsUploadToSlateV2 from "~/components/api-docs/v2/upload.js";
|
2021-07-13 08:02:53 +03:00
|
|
|
import APIDocsCreateLinkV2 from "~/components/api-docs/v2/create-link.js";
|
2021-07-13 22:08:56 +03:00
|
|
|
import APIDocsCreateCollectionV2 from "~/components/api-docs/v2/create-collection.js";
|
2021-08-02 05:56:55 +03:00
|
|
|
import APIDocsUploadByCidV2 from "~/components/api-docs/v2/upload-by-cid.js";
|
|
|
|
import APIDocsUploadByUrlV2 from "~/components/api-docs/v2/upload-by-url.js";
|
2021-11-12 01:40:39 +03:00
|
|
|
|
|
|
|
import APIDocsGetV3 from "~/components/api-docs/v3/get";
|
|
|
|
import APIDocsGetSlateV3 from "~/components/api-docs/v3/get-slate.js";
|
|
|
|
import APIDocsUpdateSlateV3 from "~/components/api-docs/v3/update-slate.js";
|
|
|
|
import APIDocsUpdateFileV3 from "~/components/api-docs/v3/update-file.js";
|
|
|
|
import APIDocsUploadToSlateV3 from "~/components/api-docs/v3/upload.js";
|
|
|
|
import APIDocsCreateLinkV3 from "~/components/api-docs/v3/create-link.js";
|
|
|
|
import APIDocsCreateCollectionV3 from "~/components/api-docs/v3/create-collection.js";
|
|
|
|
import APIDocsUploadByCidV3 from "~/components/api-docs/v3/upload-by-cid.js";
|
|
|
|
import APIDocsUploadByUrlV3 from "~/components/api-docs/v3/upload-by-url.js";
|
|
|
|
|
2021-05-17 06:23:46 +03:00
|
|
|
import WebsitePrototypeWrapper from "~/components/core/WebsitePrototypeWrapper";
|
2021-05-11 19:42:33 +03:00
|
|
|
|
2023-01-21 18:57:58 +03:00
|
|
|
const STYLES_API_KEY = css`
|
|
|
|
height: 40px;
|
|
|
|
border-radius: 4px;
|
|
|
|
cursor: copy;
|
|
|
|
background-color: ${Constants.semantic.bgLight};
|
|
|
|
outline: none;
|
|
|
|
border: none;
|
|
|
|
width: 100%;
|
|
|
|
max-width: 380px;
|
|
|
|
font-family: ${Constants.font.code};
|
|
|
|
padding: 0 16px;
|
|
|
|
font-size: 14px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_KEY_CONTAINER = css`
|
|
|
|
height: 40px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
`;
|
|
|
|
|
2021-08-02 05:56:55 +03:00
|
|
|
const STYLES_EXAMPLE = css`
|
|
|
|
margin-bottom: 48px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_SECTION_HEADER = css`
|
|
|
|
margin-top: 48px;
|
|
|
|
margin-bottom: 24px;
|
|
|
|
`;
|
|
|
|
|
2023-01-21 18:57:58 +03:00
|
|
|
class Key extends React.Component {
|
|
|
|
_input;
|
|
|
|
|
|
|
|
state = { visible: false, copying: false, modalShow: false };
|
|
|
|
|
|
|
|
_handleDelete = async (res, id) => {
|
|
|
|
if (!res) {
|
|
|
|
this.setState({ modalShow: false });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
await this.props.onDelete(id);
|
|
|
|
this.setState({ modalShow: false });
|
|
|
|
};
|
|
|
|
|
|
|
|
_handleCopy = async () => {
|
|
|
|
this._input.select();
|
|
|
|
document.execCommand("copy");
|
|
|
|
await this.setState({ copying: true });
|
|
|
|
await Window.delay(1000);
|
|
|
|
await this.setState({ copying: false });
|
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div css={STYLES_KEY_CONTAINER}>
|
|
|
|
<input
|
|
|
|
ref={(c) => {
|
|
|
|
this._input = c;
|
|
|
|
}}
|
|
|
|
value={this.state.copying ? "Copied!" : this.props.data.key}
|
|
|
|
readOnly
|
|
|
|
type={this.state.visible || this.state.copying ? "text" : "password"}
|
|
|
|
css={STYLES_API_KEY}
|
|
|
|
onClick={this._handleCopy}
|
|
|
|
onMouseEnter={() => this.setState({ visible: true })}
|
|
|
|
onMouseLeave={() => this.setState({ visible: false })}
|
|
|
|
/>
|
|
|
|
<SquareButtonGray
|
|
|
|
onClick={() => this.setState({ modalShow: true })}
|
|
|
|
style={{
|
|
|
|
marginLeft: 8,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<SVG.Trash height="16px" />
|
|
|
|
</SquareButtonGray>
|
|
|
|
|
|
|
|
{this.state.modalShow && (
|
|
|
|
<ConfirmationModal
|
|
|
|
type={"DELETE"}
|
|
|
|
withValidation={false}
|
|
|
|
callback={(e) => this._handleDelete(e, this.props.data.id)}
|
|
|
|
header={`Are you sure you want to revoke this API key?`}
|
|
|
|
subHeader={`Any services using it will no longer be able to access your Slate account.`}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2020-07-16 04:36:29 +03:00
|
|
|
export default class SceneSettingsDeveloper extends React.Component {
|
2021-04-19 22:30:11 +03:00
|
|
|
_bucketCID;
|
|
|
|
|
2020-07-28 09:54:15 +03:00
|
|
|
state = {
|
|
|
|
loading: false,
|
2021-03-24 07:10:26 +03:00
|
|
|
language: "javascript",
|
|
|
|
docs: "GET",
|
2021-04-19 22:30:11 +03:00
|
|
|
copying: false,
|
2021-05-11 19:42:33 +03:00
|
|
|
modalShow: false,
|
2021-04-19 22:30:11 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
_handleCopy = async () => {
|
|
|
|
this._bucketCID.select();
|
|
|
|
document.execCommand("copy");
|
|
|
|
await this.setState({ copying: true });
|
|
|
|
await Window.delay(1000);
|
|
|
|
await this.setState({ copying: false });
|
2020-07-28 09:54:15 +03:00
|
|
|
};
|
|
|
|
|
2023-01-17 19:03:09 +03:00
|
|
|
_handleSave = async () => {
|
2020-07-28 09:54:15 +03:00
|
|
|
this.setState({ loading: true });
|
|
|
|
|
|
|
|
const response = await Actions.generateAPIKey();
|
2020-09-12 01:25:33 +03:00
|
|
|
|
2020-11-28 07:39:01 +03:00
|
|
|
Events.hasError(response);
|
2020-07-28 09:54:15 +03:00
|
|
|
|
|
|
|
this.setState({ loading: false });
|
|
|
|
};
|
|
|
|
|
|
|
|
_handleDelete = async (id) => {
|
2021-05-12 08:48:35 +03:00
|
|
|
this.setState({ loading: true, modalShow: false });
|
2020-07-28 09:54:15 +03:00
|
|
|
|
|
|
|
const response = await Actions.deleteAPIKey({ id });
|
|
|
|
|
2020-11-28 07:39:01 +03:00
|
|
|
Events.hasError(response);
|
|
|
|
|
2021-05-12 08:48:35 +03:00
|
|
|
this.setState({ loading: false });
|
2020-07-28 09:54:15 +03:00
|
|
|
};
|
|
|
|
|
2021-03-22 21:17:42 +03:00
|
|
|
_handleChangeLanguage = (newLanguage) => {
|
|
|
|
this.setState({ language: newLanguage });
|
|
|
|
};
|
|
|
|
|
2020-07-16 04:36:29 +03:00
|
|
|
render() {
|
2021-11-12 01:40:39 +03:00
|
|
|
const tab = this.props.page.params?.tab || "v3";
|
2021-03-24 07:10:26 +03:00
|
|
|
let APIKey = "YOUR-API-KEY-HERE";
|
2021-03-25 02:30:41 +03:00
|
|
|
let lang = this.state.language;
|
2020-07-29 02:08:38 +03:00
|
|
|
if (this.props.viewer.keys) {
|
|
|
|
if (this.props.viewer.keys.length) {
|
2021-03-22 21:17:42 +03:00
|
|
|
APIKey = this.props.viewer.keys[0].key;
|
2020-07-29 02:08:38 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-24 07:10:26 +03:00
|
|
|
let slateId = "YOUR-SLATE-ID-VALUE";
|
2020-07-29 02:08:38 +03:00
|
|
|
if (this.props.viewer.slates) {
|
|
|
|
if (this.props.viewer.slates.length) {
|
|
|
|
slateId = this.props.viewer.slates[0].id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-28 09:54:15 +03:00
|
|
|
return (
|
2021-05-17 06:23:46 +03:00
|
|
|
<WebsitePrototypeWrapper
|
|
|
|
title={`${this.props.page.pageTitle} • Slate`}
|
|
|
|
url={`${Constants.hostname}${this.props.page.pathname}`}
|
|
|
|
>
|
|
|
|
<ScenePage>
|
|
|
|
{/*
|
2021-03-22 21:17:42 +03:00
|
|
|
<div css={STYLES_SIDEBAR}>
|
2021-03-24 07:10:26 +03:00
|
|
|
<span css={STYLES_LINK} onClick={() => this._changeDocs("INTRO")}>
|
2021-03-22 21:17:42 +03:00
|
|
|
Introduction
|
|
|
|
</span>
|
2021-03-24 07:10:26 +03:00
|
|
|
<span css={STYLES_LABEL}>api</span>
|
2021-03-22 21:17:42 +03:00
|
|
|
<div>
|
2021-03-24 07:10:26 +03:00
|
|
|
<span
|
|
|
|
css={STYLES_LINK}
|
2021-07-07 22:14:51 +03:00
|
|
|
style={{ color: this.state.docs === "GET" ? Constants.system.blue : null }}
|
2021-03-24 07:10:26 +03:00
|
|
|
onClick={() => this._changeDocs("GET")}
|
|
|
|
>
|
2021-03-22 21:17:42 +03:00
|
|
|
Get all slates
|
|
|
|
</span>
|
2021-03-24 07:10:26 +03:00
|
|
|
<span
|
|
|
|
css={STYLES_LINK}
|
2021-07-07 22:14:51 +03:00
|
|
|
style={{ color: this.state.docs === "GET_SLATE" ? Constants.system.blue : null }}
|
2021-03-24 07:10:26 +03:00
|
|
|
onClick={() => this._changeDocs("GET_SLATE")}
|
|
|
|
>
|
2021-03-22 21:17:42 +03:00
|
|
|
Get slate by ID
|
|
|
|
</span>
|
2021-03-24 07:10:26 +03:00
|
|
|
<span
|
|
|
|
css={STYLES_LINK}
|
|
|
|
style={{
|
2021-07-07 22:14:51 +03:00
|
|
|
color: this.state.docs === "UPLOAD_TO_SLATE" ? Constants.system.blue : null,
|
2021-03-24 07:10:26 +03:00
|
|
|
}}
|
|
|
|
onClick={() => this._changeDocs("UPLOAD_TO_SLATE")}
|
|
|
|
>
|
2021-03-22 21:17:42 +03:00
|
|
|
Upload to slate by ID
|
|
|
|
</span>
|
2021-03-24 07:10:26 +03:00
|
|
|
<span
|
|
|
|
css={STYLES_LINK}
|
2021-07-07 22:14:51 +03:00
|
|
|
style={{ color: this.state.docs === "UPDATE_SLATE" ? Constants.system.blue : null }}
|
2021-03-24 07:10:26 +03:00
|
|
|
onClick={() => this._changeDocs("UPDATE_SLATE")}
|
|
|
|
>
|
2021-03-22 21:17:42 +03:00
|
|
|
Update slate
|
|
|
|
</span>
|
|
|
|
</div>
|
2021-03-24 07:10:26 +03:00
|
|
|
<span css={STYLES_LABEL}>guides</span>
|
2021-03-22 21:17:42 +03:00
|
|
|
</div>
|
2021-03-25 02:30:41 +03:00
|
|
|
*/}
|
2023-01-21 18:57:58 +03:00
|
|
|
|
|
|
|
<ScenePageHeader title="API Keys">
|
|
|
|
You can use your API keys to access your account information outside of Slate and upload
|
|
|
|
files to Slate. You can have a maximum of 10 keys at any given time.
|
|
|
|
</ScenePageHeader>
|
|
|
|
|
|
|
|
<System.DescriptionGroup style={{ maxWidth: 640, marginBottom: 24 }} label="API Keys" />
|
|
|
|
{this.props.viewer.keys.map((k) => {
|
|
|
|
return <Key key={k.id} data={k} onDelete={this._handleDelete} />;
|
|
|
|
})}
|
|
|
|
|
|
|
|
<div style={{ marginTop: 24 }}>
|
|
|
|
{this.props.viewer.keys.length < 10 ? (
|
|
|
|
<System.ButtonPrimary onClick={this._handleSave} loading={this.state.loading}>
|
|
|
|
Generate
|
|
|
|
</System.ButtonPrimary>
|
|
|
|
) : (
|
|
|
|
<System.ButtonDisabled>Generate</System.ButtonDisabled>
|
|
|
|
)}
|
|
|
|
{this.props.viewer.keys.length === 0 ? (
|
|
|
|
<ScenePageHeader title="">
|
|
|
|
Generate an API key to have it appear in the code examples
|
|
|
|
</ScenePageHeader>
|
|
|
|
) : null}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<ScenePageHeader title="Developer Documentation" style={{ marginTop: 96 }}>
|
2021-11-12 01:40:39 +03:00
|
|
|
Slate is currently on v3.0 of the API. While prior versions are still supported, we
|
2021-05-17 06:23:46 +03:00
|
|
|
recommend using the most up to date version.
|
|
|
|
</ScenePageHeader>
|
|
|
|
|
|
|
|
<SecondaryTabGroup
|
|
|
|
tabs={[
|
2021-11-12 01:40:39 +03:00
|
|
|
{ title: "Version 3.0", value: { tab: "v3" } },
|
2021-05-17 06:23:46 +03:00
|
|
|
{ title: "Version 2.0", value: { tab: "v2" } },
|
|
|
|
{ title: "Version 1.0", value: { tab: "v1" } },
|
|
|
|
]}
|
|
|
|
value={tab}
|
|
|
|
onAction={this.props.onAction}
|
|
|
|
/>
|
2021-04-19 22:30:11 +03:00
|
|
|
|
2021-11-12 01:40:39 +03:00
|
|
|
{tab === "v3" ? (
|
2021-05-17 06:23:46 +03:00
|
|
|
<>
|
2021-08-02 05:56:55 +03:00
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Get</System.H2>
|
2021-11-12 01:40:39 +03:00
|
|
|
<APIDocsGetV3
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
2021-11-12 01:40:39 +03:00
|
|
|
<APIDocsGetSlateV3
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Update</System.H2>
|
|
|
|
<APIDocsUpdateSlateV3
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsUpdateFileV3
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Create</System.H2>
|
|
|
|
<APIDocsCreateCollectionV3
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsUploadToSlateV3
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
2021-11-12 01:40:39 +03:00
|
|
|
<APIDocsUploadByCidV3
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
2021-11-12 01:40:39 +03:00
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsUploadByUrlV3
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsCreateLinkV3
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
) : tab === "v2" ? (
|
|
|
|
<>
|
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Get</System.H2>
|
|
|
|
<APIDocsGetV2
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsGetSlateV2
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
2021-05-17 06:23:46 +03:00
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
2021-08-02 05:56:55 +03:00
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Update</System.H2>
|
2021-05-17 06:23:46 +03:00
|
|
|
<APIDocsUpdateSlateV2
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsUpdateFileV2
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
2021-08-02 05:56:55 +03:00
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Create</System.H2>
|
2021-07-13 22:08:56 +03:00
|
|
|
<APIDocsCreateCollectionV2
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-07-13 22:08:56 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
2021-05-17 06:23:46 +03:00
|
|
|
<APIDocsUploadToSlateV2
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsUploadByCidV2
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsUploadByUrlV2
|
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
2021-07-13 08:02:53 +03:00
|
|
|
/>
|
|
|
|
<APIDocsCreateLinkV2
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-07-13 08:02:53 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
2021-05-17 06:23:46 +03:00
|
|
|
/>
|
|
|
|
</>
|
|
|
|
) : (
|
|
|
|
<>
|
2021-08-02 05:56:55 +03:00
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Read operations</System.H2>
|
2021-05-17 06:23:46 +03:00
|
|
|
<APIDocsGetV1
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
<APIDocsGetSlateV1
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
2021-08-02 05:56:55 +03:00
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Update operations</System.H2>
|
2021-05-17 06:23:46 +03:00
|
|
|
<APIDocsUpdateSlateV1
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
2021-08-02 05:56:55 +03:00
|
|
|
<System.H2 css={STYLES_SECTION_HEADER}>Create operations</System.H2>
|
2021-05-17 06:23:46 +03:00
|
|
|
<APIDocsUploadToSlateV1
|
2021-08-02 05:56:55 +03:00
|
|
|
cssValue={STYLES_EXAMPLE}
|
2021-05-17 06:23:46 +03:00
|
|
|
language={lang}
|
|
|
|
APIKey={APIKey}
|
|
|
|
slateId={slateId}
|
|
|
|
onLanguageChange={this._handleChangeLanguage}
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
</ScenePage>
|
|
|
|
</WebsitePrototypeWrapper>
|
2020-07-28 09:54:15 +03:00
|
|
|
);
|
2020-07-16 04:36:29 +03:00
|
|
|
}
|
|
|
|
}
|