This repository has been archived by the owner on Dec 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from seregazhuk/develop
Registration add
- Loading branch information
Showing
36 changed files
with
468 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ use seregazhuk\PinterestBot\Factories\PinterestBot; | |
$bot = PinterestBot::create(); | ||
|
||
// login | ||
$bot->login('mypinterestlogin', 'mypinterestpassword'); | ||
$bot->user->login('mypinterestlogin', 'mypinterestpassword'); | ||
|
||
// get lists of your boards | ||
$boards = $bot->boards->forUser('yourUserName'); | ||
|
@@ -69,19 +69,31 @@ Or you may skip login, if you want. It is only required for such operations as l | |
You can get your current logged in status via *isLoggedIn* method: | ||
|
||
```php | ||
if($bot->isLoggedIn()) { | ||
if($bot->user->isLoggedIn()) { | ||
// ... | ||
} | ||
``` | ||
To logout use *logout* method: | ||
|
||
```php | ||
$bot->logout(); | ||
$bot->user->logout(); | ||
``` | ||
|
||
*Note*: Some functions use pinterest navigation through results, for example, | ||
get user followers or search queries. These functions return a generator object with api results. By default functions | ||
return all pinterest results, but you can pass a limit num as the second argument. For example, | ||
To register a new user: | ||
|
||
```php | ||
$bot->user->register('[email protected]', 'password', 'Name'); | ||
``` | ||
|
||
You can specify additional parameters with registration: age and country. By default they are: 18, "UK": | ||
|
||
```php | ||
$bot->user->register('[email protected]', 'password', 'Name', 40, "DE"); | ||
``` | ||
|
||
*Note*: Some functions use pinterest navigation through results, for example, get user followers or search queries. | ||
These functions return a generator object with api results. By default functions return all pinterest results, | ||
but you can pass a limit num as a second argument. For example, | ||
```php | ||
foreach($bot->pins->search('query', 2) as $pin) { | ||
// ... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.