Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: IPFS examples #385

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 39 additions & 8 deletions blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5349,14 +5349,6 @@ paths:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $PROJECT_ID" \
-F "file=@./README.md"
requestBody:
content:
multipart/form-data:
Expand All @@ -5366,6 +5358,14 @@ paths:
file:
type: string
format: binary
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $PROJECT_ID" \
-F "file=@./README.md"
responses:
'200':
description: Returns information about added IPFS object
Expand Down Expand Up @@ -5415,6 +5415,12 @@ paths:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/gateway/{IPFS_path}" \
-H "project_id: $PROJECT_ID" \
parameters:
- in: path
required: true
Expand Down Expand Up @@ -5457,6 +5463,12 @@ paths:
schema:
type: string
description: Path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/add/{IPFS_path}" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns pinned object
Expand Down Expand Up @@ -5540,6 +5552,12 @@ paths:
description: |
The ordering of items from the point of view of the blockchain,
not the page listing itself. By default, we return oldest first, newest last.
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/list/" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns pinned objects
Expand Down Expand Up @@ -5618,6 +5636,12 @@ paths:
schema:
type: string
description: The path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/list/{IPFS_PATH}" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns the pins pinned
Expand Down Expand Up @@ -5695,6 +5719,13 @@ paths:
schema:
type: string
description: The path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/remove/{IPFS_PATH}" \
-X POST \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns the pins removed
Expand Down
48 changes: 40 additions & 8 deletions docs/blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5600,14 +5600,6 @@ paths:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $PROJECT_ID" \
-F "file=@./README.md"
requestBody:
content:
multipart/form-data:
Expand All @@ -5617,6 +5609,14 @@ paths:
file:
type: string
format: binary
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $PROJECT_ID" \
-F "file=@./README.md"
responses:
'200':
description: Returns information about added IPFS object
Expand Down Expand Up @@ -5668,6 +5668,12 @@ paths:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/gateway/{IPFS_path}" \
-H "project_id: $PROJECT_ID" \
parameters:
- in: path
required: true
Expand Down Expand Up @@ -5713,6 +5719,12 @@ paths:
schema:
type: string
description: Path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/add/{IPFS_path}" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns pinned object
Expand Down Expand Up @@ -5798,6 +5810,12 @@ paths:

not the page listing itself. By default, we return oldest first,
newest last.
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/list/" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns pinned objects
Expand Down Expand Up @@ -5883,6 +5901,12 @@ paths:
schema:
type: string
description: The path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/list/{IPFS_PATH}" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns the pins pinned
Expand Down Expand Up @@ -5971,6 +5995,14 @@ paths:
schema:
type: string
description: The path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: >
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/remove/{IPFS_PATH}"
\
-X POST \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns the pins removed
Expand Down
48 changes: 40 additions & 8 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5600,14 +5600,6 @@ paths:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $PROJECT_ID" \
-F "file=@./README.md"
requestBody:
content:
multipart/form-data:
Expand All @@ -5617,6 +5609,14 @@ paths:
file:
type: string
format: binary
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $PROJECT_ID" \
-F "file=@./README.md"
responses:
'200':
description: Returns information about added IPFS object
Expand Down Expand Up @@ -5668,6 +5668,12 @@ paths:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/gateway/{IPFS_path}" \
-H "project_id: $PROJECT_ID" \
parameters:
- in: path
required: true
Expand Down Expand Up @@ -5713,6 +5719,12 @@ paths:
schema:
type: string
description: Path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/add/{IPFS_path}" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns pinned object
Expand Down Expand Up @@ -5798,6 +5810,12 @@ paths:

not the page listing itself. By default, we return oldest first,
newest last.
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/list/" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns pinned objects
Expand Down Expand Up @@ -5883,6 +5901,12 @@ paths:
schema:
type: string
description: The path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/list/{IPFS_PATH}" \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns the pins pinned
Expand Down Expand Up @@ -5971,6 +5995,14 @@ paths:
schema:
type: string
description: The path to the IPFS object
x-codeSamples:
- lang: Shell
label: cURL
source: >
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/remove/{IPFS_PATH}"
\
-X POST \
-H "project_id: $PROJECT_ID" \
responses:
'200':
description: Returns the pins removed
Expand Down
16 changes: 8 additions & 8 deletions src/paths/ipfs/add.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ post:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
x-codeSamples:
- lang: "Shell"
label: "cURL"
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $PROJECT_ID" \
-F "file=@./README.md"
requestBody:
content:
multipart/form-data:
Expand All @@ -29,6 +21,14 @@ post:
file:
type: string
format: binary
x-codeSamples:
- lang: "Shell"
label: "cURL"
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $PROJECT_ID" \
-F "file=@./README.md"
responses:
"200":
description: Returns information about added IPFS object
Expand Down
6 changes: 6 additions & 0 deletions src/paths/ipfs/gateway/{IPFS_path}/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ get:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
x-codeSamples:
- lang: "Shell"
label: "cURL"
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/gateway/{IPFS_path}" \
-H "project_id: $PROJECT_ID" \
parameters:
- in: path
required: true
Expand Down
6 changes: 6 additions & 0 deletions src/paths/ipfs/pin/add/{IPFS_path}/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ post:
schema:
type: string
description: Path to the IPFS object
x-codeSamples:
- lang: "Shell"
label: "cURL"
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/add/{IPFS_path}" \
-H "project_id: $PROJECT_ID" \
responses:
"200":
description: Returns pinned object
Expand Down
6 changes: 6 additions & 0 deletions src/paths/ipfs/pin/list/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ get:
description: |
The ordering of items from the point of view of the blockchain,
not the page listing itself. By default, we return oldest first, newest last.
x-codeSamples:
- lang: "Shell"
label: "cURL"
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/list/" \
-H "project_id: $PROJECT_ID" \
responses:
"200":
description: Returns pinned objects
Expand Down
6 changes: 6 additions & 0 deletions src/paths/ipfs/pin/list/{IPFS_path}/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ get:
schema:
type: string
description: The path to the IPFS object
x-codeSamples:
- lang: "Shell"
label: "cURL"
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/list/{IPFS_PATH}" \
-H "project_id: $PROJECT_ID" \
responses:
"200":
description: Returns the pins pinned
Expand Down
7 changes: 7 additions & 0 deletions src/paths/ipfs/pin/remove/{IPFS_path}/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ post:
schema:
type: string
description: The path to the IPFS object
x-codeSamples:
- lang: "Shell"
label: "cURL"
source: |
curl "https://ipfs.blockfrost.io/api/v0/ipfs/pin/remove/{IPFS_PATH}" \
-X POST \
-H "project_id: $PROJECT_ID" \
responses:
"200":
description: Returns the pins removed
Expand Down