### Install Droplr API Client Source: https://github.com/droplr/droplr-js/blob/stage/README.md Installs the Droplr API client for Javascript using npm. This is the first step to integrating the client into your project. ```bash npm install --save droplr-api ``` -------------------------------- ### Test Droplr API Client Source: https://github.com/droplr/droplr-js/blob/stage/README.md Installs project dependencies and runs tests for the Droplr API client. Functional tests require Droplr credentials. ```bash npm install npm test ``` ```bash USERNAME=my@email.com PASSWORD=MyPassword npm run test:functional ``` -------------------------------- ### Create Note Drop with Droplr API Source: https://github.com/droplr/droplr-js/blob/stage/README.md Creates a note drop using the Droplr API client. This example demonstrates creating a plain text note. ```javascript const noteDrop = await client.drops.create({ type: 'NOTE', variant: 'text/plain', content: 'My note', }); ``` -------------------------------- ### Create Link Drop with Droplr API Source: https://github.com/droplr/droplr-js/blob/stage/README.md Creates a link drop using the Droplr API client. This example shows how to create a drop that points to a given URL. ```javascript const linkDrop = await client.drops.create({ type: 'LINK', content: 'http://some-long-url.com/', }); ``` -------------------------------- ### Create File Drop with Droplr API Source: https://github.com/droplr/droplr-js/blob/stage/README.md Creates a file drop using the Droplr API client. This example demonstrates creating a PNG image drop with a specified title and content from a readable stream. ```javascript const fileDrop = await client.drops.create({ type: 'FILE', variant: 'image/png', title: 'file.png', content: fs.createReadStream('some/path/file.png'), }); ``` -------------------------------- ### Initialize Droplr Client with Basic Authentication Source: https://github.com/droplr/droplr-js/blob/stage/README.md Initializes the Droplr client using Basic Authentication with provided username and password. This client can then be used to interact with the Droplr API. ```javascript const Droplr = require('droplr-api'); const client = new Droplr.Client({ auth: new Droplr.BasicAuth('username', 'password'), }); ``` -------------------------------- ### Initialize Droplr Client with Axios Options Source: https://github.com/droplr/droplr-js/blob/stage/README.md Initializes the Droplr client with custom Axios options, such as setting a maximum content length. This allows for fine-tuning HTTP request behavior. ```javascript const client = new Droplr.Client({ auth: new Droplr.BasicAuth('username', 'password'), maxContentLength: 500 * 1024 * 1024 * 1024, // maxBodyLength limit }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.