GithubHelp home page GithubHelp logo

alikaptanoglu / pinterest-pinner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dzafel/pinterest-pinner

0.0 0.0 0.0 52 KB

Programmatically create a pin. Pinterest auto-poster (auto-pinner, autoposter, autopinner, api).

License: GNU General Public License v2.0

PHP 100.00%

pinterest-pinner's Introduction

DEPRECATED AND NO LONGER MAINTAINED, however, as of 2017-03-01, this library still works.

Please see the official Pinterest API.

PinterestPinner PHP Class

Pinterest API is not released yet, so there is no way to programmatically create a pin. So here is this class for - Autoposter, Autopinner, whatever you like to call it.

This is an unofficial API, and likely to change and break at any moment.

PinterestPinner is not a way to avoid any Pinterest terms, conditions, rules and regulations. Please use the class in accordance with all Pinterest rules. If you abuse the service you will be banned there.

Please follow the PSR-2 coding standards if you would like to create a pull request.

Installation

You can easily install PinterestPinner with the following command:

composer require dzafel/pinterest-pinner:2.*

or alternatively, include a dependency for dzafel/pinterest-pinner in your composer.json file. For example:

{
    "require": {
        "dzafel/pinterest-pinner": "2.*"
    }
}

How to use it?

To add a new pin:

try {
    $pinterest = new \PinterestPinner\Pinner;
    $pin_id = $pinterest->setLogin('Your Pinterest Login')
        ->setPassword('Your Pinterest Password')
        ->setBoardID('Pinterest Board ID')
        ->setImage('Image URL')
        ->setDescription('Pin Description')
        ->setLink('Pin Link')
        ->pin();
} catch (\PinterestPinner\PinnerException $e) {
    echo $e->getMessage();
}

You can also get additional info:

// Get a list of boards
$boards = $pinterest->getBoards();

// Get a list of pins
$pins = $pinterest->getPins();

// Get logged in user data
$user = $pinterest->getUserData();

Changelog

2.0.7 (2016-09-22)

  • FIX: composer.json version fix

2.0.6 (2016-09-21)

  • FIX: getUserData() should load the user details from tree > data array path instead of resourceDataCache (#21)

2.0.5 (2016-06-11)

  • Added Guzzle 6 support (required: >=5.0)

2.0.4 (2016-03-12)

  • FIX: _responseToArray() now search for config JSON in <script id="jsInit1"> instead of P.main.start() function (#17)

2.0.3 (2015-11-11)

  • FIX: new getBoards() logic, now it returns all boards instead of just first 50 (#16)

2.0.2 (2015-10-05)

  • FIX: typo in init function - P.start.start instead of P.main.start (#15)
  • FIX: getBoards() always returned empty array, because getPins() returned pins collection, not full response json (#15)

2.0.1 (2015-09-23)

  • FIX: init function name changed from P.scout.init to P.main.start (#14)
  • FIX: do preg_match() only if response value is a string
  • NEW: added public $user_data variable
  • NEW: changed some private methods and vars to protected so class can be extended

2.0 (2015-04-09)

  • NEW: Library is now composer friendly
  • NEW: Added Guzzle dependency

1.0.1 (2014-11-02)

  • FIX: reload CSRF token upon login

1.0 (2014-06-04)

  • Initial release

pinterest-pinner's People

Contributors

dzafel avatar gordielachance avatar pawelawmous avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.