Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinatacloud/files-api-starter
A collection of scripts that demonstrate how to use the Files API
https://github.com/pinatacloud/files-api-starter
Last synced: 17 days ago
JSON representation
A collection of scripts that demonstrate how to use the Files API
- Host: GitHub
- URL: https://github.com/pinatacloud/files-api-starter
- Owner: PinataCloud
- Created: 2024-11-07T16:14:23.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-07T16:32:31.000Z (about 2 months ago)
- Last Synced: 2024-11-07T17:34:46.881Z (about 2 months ago)
- Language: TypeScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# files-api-starter
This repo includes some basic API calls to help get you started using the Files API.
**Watch the video!**
[![IMAGE ALT TEXT HERE](https://dweb.mypinata.cloud/files/bafybeib7vgvirnymt53oefbpvx2tg6v5awr56nze2sihkt4jjcn2q22qfm)](https://www.youtube.com/watch?v=sisFpJs6hcg)> [!TIP]
> If you plan to use Pinata in a Typescript/Javascript enviornment, check out our [SDK](https://github.com/PinataCloud/pinata)!## Getting Started
First follow [these steps](https://docs.pinata.cloud/quickstart) to make a free Pinata account and get your API key and Gateway URL
By default this repo will use [Bun.sh](https://bun.sh) so install this first unless you plan to run the files with another program.
Clone the repo to your machine and install the dependencies
```bash
git clone https://github.com/PinataCloud/files-api-startercd files-api-starter
bun install
```Rename the `.env.example` file to `.env` and paste in your Pinata JWT API key and Gateway URL
```
PINATA_JWT=
GATEWAY_URL=
```## Usage
Start using the API by running the following:
```
bun upload-files.ts
```Continue testing by running the other files included in the repo