mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-27 11:03:23 +03:00
edits to documentation for api
This commit is contained in:
parent
81b08a85a8
commit
0bc77d6419
@ -22,14 +22,9 @@ if (!response) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
console.log(response.error);
|
|
||||||
return response.error;
|
|
||||||
}
|
|
||||||
|
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.log(json.error);
|
console.log(json);
|
||||||
} else {
|
} else {
|
||||||
const collection = json.slate;
|
const collection = json.slate;
|
||||||
}`;
|
}`;
|
||||||
|
@ -22,14 +22,9 @@ if (!response) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
console.log(response.error);
|
|
||||||
return response.error;
|
|
||||||
}
|
|
||||||
|
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.log(json.error);
|
console.log(json);
|
||||||
} else {
|
} else {
|
||||||
const collection = json.collection;
|
const collection = json.collection;
|
||||||
}`;
|
}`;
|
||||||
|
@ -22,14 +22,9 @@ if (!response) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
console.log(response.error);
|
|
||||||
return response.error;
|
|
||||||
}
|
|
||||||
|
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.log(json.error);
|
console.log(json);
|
||||||
} else {
|
} else {
|
||||||
const user = json.user;
|
const user = json.user;
|
||||||
}`;
|
}`;
|
||||||
|
@ -16,14 +16,9 @@ if (!response) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!response.ok) {
|
|
||||||
console.log(response.error);
|
|
||||||
return response.error;
|
|
||||||
}
|
|
||||||
|
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.log(json.error);
|
console.log(json);
|
||||||
} else {
|
} else {
|
||||||
const collections = json.collections;
|
const collections = json.collections;
|
||||||
const user = json.user;
|
const user = json.user;
|
||||||
@ -53,7 +48,7 @@ const EXAMPLE_RESPONSE = `
|
|||||||
objects: [
|
objects: [
|
||||||
{
|
{
|
||||||
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/file-cid"
|
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||||
filename: "door.jpg",
|
filename: "door.jpg",
|
||||||
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||||
data: {
|
data: {
|
||||||
@ -92,7 +87,7 @@ const EXAMPLE_RESPONSE = `
|
|||||||
library: [
|
library: [
|
||||||
{
|
{
|
||||||
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||||
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/file-cid"
|
cid: "bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a", // the file URL is "https://slate.textile.io/ipfs/bafkreibrpxcv37juaq67it2gu7xyjo5fzq7v3r55ykcgzylvsfljcv3s3a"
|
||||||
filename: "door.jpg",
|
filename: "door.jpg",
|
||||||
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
ownerId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||||
data: {
|
data: {
|
||||||
|
Loading…
Reference in New Issue
Block a user