npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-pinterest

v1.1.1

Published

Cordova plugin for Pinterest

Downloads

8

Readme

npm

NPM

cordova-plugin-pinterest

Cordova plugin for Pinterest

Platforms

This plugin supports Android and iOS

Installation

cordova plugin add cordova-plugin-pinterest

// or 

cordova plugin add https://github.com/zyramedia/cordova-plugin-pinterest

Usage

You can access the plugins functions via the global variable cordova.plugins.Pinterest.

Example


function onSuccess(response) {
    console.log('Success, the response is: ', reponse);
}

function onError(errorMessage) {
    console.error('Error, the error message is: ', errorMessage);
}

var scopes = [
    cordova.plugins.Pinterest.SCOPES.READ_PUBLIC,
    cordova.plugins.Pinterest.SCOPES.WRITE_PUBLIC,
    cordova.plugins.Pinterest.SCOPES.READ_RELATIONSHIPS,
    cordova.plugins.Pinterest.SCOPES.WRITE_RELATIONSHIPS
];

// lets login first
cordova.plugins.Pinterest.login(scopes, onSuccess, onError);

// after logging in, we can perform any other function
// for the sake of a clean example, this code is here, but you should wait for the login function to succeed first
cordova.plugins.Pinterest.getMyPins(onSuccess, onError);

Methods

login

login(scopes, onSuccess, onError)
  • scopes: List of permissions to request. You can use cordova.plugins.Pinterest.SCOPES constants for convenience. Available permissions are: read_public, write_public, read_relationships, write_relationships.

Logs the user in. The response object will contain the user's profile data, as well as the access token (if you need to use it elsewhere, example: send it to your server and perform actions on behalf of the user).

getMe

getMe(onSuccess, onError, fields)
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.

Gets the authenticated user's profile.

getMyPins

getMyPins(onSuccess, onError, fields, limit)
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.
  • limit: (optional) Limit the number of items returned. Capped to 100. Defaults to 100.

Gets the authenticated user's Pins.

getMyBoards

getMyBoards(onSuccess, onError, fields, limit)
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.
  • limit: (optional) Limit the number of items returned. Capped to 100. Defaults to 100.

Get the authenticated user's boards.

getMyLikes

getMyLikes(onSuccess, onError, fields, limit)
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.
  • limit: (optional) Limit the number of items returned. Capped to 100. Defaults to 100.

Get the authenticated user's likes.

getMyFollowers

getMyFollowers(onSucccess, onError, fields, limit)
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.
  • limit: (optional) Limit the number of items returned. Capped to 100. Defaults to 100.

Get the authenticated user's followers.

getMyFollowedBoards

getMyFollowedBoards(onSuccess, onError, fields, limit)
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.
  • limit: (optional) Limit the number of items returned. Capped to 100. Defaults to 100.

Get the authenticated user's followed boards.

getMyFollowedInterests

getMyFollowedInterests(onSuccess, onError, fields, limit)
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.
  • limit: (optional) Limit the number of items returned. Capped to 100. Defaults to 100.

Get the authenticated user's followed interests.

getUser

getUser(username, onSuccess, onError, fields)
  • username: Username of the user
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.

Get a user's profile.

getBoard

getBoard(boardId, onSuccess, onError, fields)
  • boardId: The ID of the board
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.

Get a board's data.

getBoardPins

getBoardPins(boardId, onSuccess, onError, fields, limit)
  • boardId: The ID of the board
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.
  • limit: (optional) Limit the number of items returned. Capped to 100. Defaults to 100.

Get Pins of a specific board.

deleteBoard

deleteBoard(boardId, onSuccess, onError)
  • boardId: The ID of the board

Delete a board.

createBoard

createBoard(name, desc, onSuccess, onError)
  • name: Name of the board
  • desc: (optional) Description of the board

Create a new board for the authenticated user.

getPin

getPin(pinId, onSuccess, onError, fields)
  • pinId: The ID of the Pin
  • fields: (optional) Fields to retrieve, separated by commas. Defaults to all available fields.

Get a Pin by ID.

deletePin

deletePin(pinId, onSuccess, onError)
  • pinId: The ID of the Pin

Delete a Pin.

createPin

createPin(note, boardId, imageUrl, link, onSuccess, onError)
  • note: Note/Description of the Pin
  • boardId: Board ID to put the Pin under
  • imageUrl: URL of the image to share
  • link: (optional) Link to share

Create a Pin for the authenticated user.


Quirks

  • This plugin does not provide any pagination features. You are limited only to the latest 100 entries and you cannot fetch the next pages. This can be fixed but it will make this API more complicated. It can be added if demanded by many users.