Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 511 Bytes

install.md

File metadata and controls

26 lines (18 loc) · 511 Bytes

Install

You can install the SDK using npm.

npm install --save pcloud-sdk-js

Then in your code:

import pCloudSdk from 'pcloud-sdk-js';

const client = pcloudSdk.createClient('OAuth Token');

client.listfolder(0)
  .then((metadata) => {
    console.log(metadata.contents);
  });

Alternatively you can use the prebuilt distributed version of the lib using a script tag:

<script type="text/javascript" src="https://unpkg.com/pcloud-sdk-js@latest/dist/pcloudsdk.js"></script>