Download the PHP package kaankilic/pinbot without Composer

On this page you can find all versions of the php package kaankilic/pinbot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pinbot

Easy to use wrapper for the Pinterest API works well with Laravel Framework.This Laravel package will help you to work with your Pinterest account using any account credentials. This library forked and inspired from seregazhuk/php-pinterest-bot.

If you have any problem with package or found any bug in package, feel free to contact me.

Installation

Dependencies

Library requires CURL extension and PHP 5.5.9 or above.

Install via Composer:

When the package downloaded by composer successfuly, you need to register Pinbot package to your application. You need to add the following statements to your config/app.php file.

After that, you need to register the facade.

Quick Start

Once you installed the Pinbot successfuly, it's ready to use it on anywhere.

Note: Some methods use pinterest navigation through results (with bookmarks), for example, get user followers/following, pins likes/dislikes, search and other feed queries. This means that for every batch of results there will be a request to Pinterest. These methods return a Pagination object with Pinterest api results.

How to avoid banned from Pinterest: don't bee too aggressive making pins or writing comments. Try to put some timeouts with $bot->wait($seconds) calls, so you will behave like a real person and not a bot, creating hundreds of pins in a minute.

Account

Login

Login method returns true on success and false if fails:

By default bot uses auto-login. It uses cookies, saved from the last session. If auto-login fails, then bot will send login requests.

To skip auto-login and force login requests, you can pass false as the third argument:

Or you may skip login if you want. It is only required for such operations as likes, follows and making pins. You can get your current logged in status via isLoggedIn method:

To logout use logout method:

Registration

To register a new user:

Use Registration form object with fluent interface for specifying additional parameters:

Register a business account. The last parameter with website url is optional:

Variant with Registration form:

After registration you will receive a confirmation email. You can pass a link from this email to confirmEmail method:

Convert your account to a business one. Requires log in. The last parameter with website url is optional:

Reset password

You can send to your email a link to reset your password:

Then your can grab a link from email and pass use it to reset password:

Profile

Change profile. To update profile you need to setup Profile form object. It has following methods:

You can change your profile avatar by using setImage() method and a path to your image:

You can get your current profile settings calling profile method without any params:

In result you can find your username, and all your account settings.

Get your current username:

Get your current user id:

Check if your account is banned:

Change you password:

Remove things you’ve recently searched for from search suggestions:

Deactivate current account:

Get sessions history:

Invitation

To invite someone by email:

Boards

Get all user's boards:

Get all current logged-in user's boards.

Get full board info by boardName and userName. Here you can get board id, for further functions (for example, pin creating or following boards):

Create a new board:

Update a board by id:

You can pass more options in update: 'privacy' - is public by default and 'category' - is other by default:

Delete a board by id:

Follow/unfollow board by id:

Get all pins for board by id (returns Pagination object):

Get board followers. Uses pinterest api pagination (returns Pagination object):

When you repin, Pinterest suggests you some board titles for it. You can get these suggestions for pin by its id:

Send board with message or by email:

Invites

Get your boards invites:

Invite someone to your board:

Accept an invite to a board:

Ignore an invite to a board:

Delete invite. Removes from the board collaborators, requires an id of the user, you want to remove from the board:

Pins

Notice! Try not to be very aggressive when pinning or commenting pins, or Pinterest will gonna ban you.

Get pin info by its id:

Create new pin. Accepts image url, board id, where to post image, description and preview url:

You can pass a path to your local image. It will be uploaded to Pinterest:

You can specify a link for pin (source) as fourth argument. If not set, link is equal to image url:

Repin a pin by its id. You need a pin id and a board id where you want to put this pin. The third parameter is a pin description and it is optional.

Edit pin by id. You can change pin's description, link or board:

Move pin to a new board:

Delete pin by id:

Like/dislike pin by id:

Copy/move pins to board. To copy/move one pin, pass it's id as the first argument. Pass an array of ids to copy/move many pins:

Save image from pin to the disk. Saves original image of the pin to the specified path:

Delete pins from board. To delete one pin, pass it's id as the first argument. Pass an array of ids to delete many pins:

Write a comment:

Delete a comment:

Get pins from a specific url. For example: https://pinterest.com/source/flickr.com/ will return recent pins from flickr.com (returns Pagination object):

Get user pins feed (returns Pagination object):

Get activity of a pin (returns Pagination object):

If you don't want to get all activity records, you can pass a limit as the second parameter. Get 5 last activity records:

Get related pins for current pin (returns Pagination object):

Get last 10 related pins for current pin:

Get trending pins for a specific topic from http://pinterest.com/discover page. Uses topic id, that can be received from $bot->topics->explore() method (returns Pagination object):

Get visual similar pins:

Send pin with message or by email:

Get your pin analytics, like numbers of clicks, views and repins (only for business account);

TryIt

Get the pinners who have tied this pin (returns Pagination object):

Try a pin. The third parameter with path to image file is optional. Returns an array with data of the created record:

Delete your try. You can use an id field from data received when you created a tryIt record:

Edit your try. You can use an id field from data received when you created a tryIt record. You also need a pin id for your try:

Pinners

Follow/unfollow user. You can use both id or username. Notice: When using username, bot will make one additional request to resolve user'id for his name:

Get user info by username:

Get user following info. By default returns following users. Returns Pagination object:

You can specify type of entities to be returned: people, interests or boards. For example:

Also you can use special methods-helpers to achieve the same results:

Get user followers (returns Pagination object). Accepts optional parameter username, whose subscribers need to receive.

Without arguments returns current users' followers:

Get the newest pins of a pinner (returns Pagination object):

Get the last 20 pins of a pinner:

Get pins that user likes (returns Pagination object):

Block a user:

Interests

Get a list of main categories. Required bot to be logged in:

Get category info by name (can be taken from main()):

Get related topics for interest:

Get pins for specific interest (returns Pagination object):

Topics

Each interest has a list of related topics.

Follow/unfollow a topic by name:

Get a topic info:

Get pins for a specific topic (returns Pagination object):

Get related topics for topic (similar as related topics for interest):

Get trending topics from http://pinterest.com/discover page. Then you can use an id of each topic to get trending pins for this topic with $bot->pins->explore() method:

Search

Search functions use Pinterest pagination in fetching results and return Pagination object:

Inbox

News

Get your current user's news (returns Pagination object):

Notifications

Get user's notifications (returns Pagination object):

Conversations

Get array of last conversations:

Write a message

Write a message to a user by id. You may specify one user by id, or pass an array of user ids:

Attach pin by id to message:

Send email

Email param may be string or array of emails:

Attach pin to email:

Contact requests

When someone at first sends you an invitation to a board, you receive a contact request. Get a list of contact requests:

To accept or to ignore a request you need to specify a request ID. This ID can be received from the array returned in $bot->inbox->contactRequests() method.

Accept a request:

Ignore a request:

Keywords

Get recommended keywords for the query:

"position" determine the order to create the complete word. For example:

So, position = 0 means the additional keyword should be put before the search keyword when making concatenation, and position = 1 is for the reverse case.

Errors handling

You can check for occurred errors after requests with method getLastError(). It returns string that contains error from you last request to API:

Use proxy

To set up proxy settings use useProxy method:

By default it uses http proxy without authentication. If your proxy requires authentication, pass auth string as the third parameter:

Use socks proxy:

If you need to stop sending requests via proxy:

Check if bot uses proxy:

Custom request settings

It is possible to add some additional Curl options for bot requests. For example, you can set proxy and User Agent like this:

With every request Pinterest returns an array with your current client info, with such info as OS, browser, IP and others:

By default it uses client info from the last request. To reload client context pass true argument:

You can get an url of the last visited page:

Cookies

Current bot cookies are available through getHttpClient and cookie/cookies methods. All cookies:

Cookie value by name:

By default cookie files are stored in your system temp directory. You can set custom path to store cookies. Notice! This path must have write permissions:

Remove your cookies:

Visit (click) a link. For example, when Pinterest sends you email with some link, and you want bot to visit it:

Pagination

Most of methods use Pinterest pagination. For example, when you run $bot->pins->search('query'), Pinterest returns only 20 results for request, you cannot get all the pins at once with only one request. So these methods return Pagination object. You can iterate over it to get results:

Or you can grab all results at once as an array, but it will require some time, to loop through all Pinterest pages to get these results:

By default methods return the first 50 results. For example, $bot->pins->search('query') will return only first 50 pins. But you can specify another limit num as a second argument. Or pass 0 for no limit. For example,

Will return only 20 pins of the search results.

Limit and offset in results:

To get all results pass 0 in take() method.

How can I thank you?

Why not star the GitHub repo? I'd love the attention!

Thanks!


All versions of pinbot with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kaankilic/pinbot contains the following files

Loading the files please wait ....