-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anton Rusakov
committed
Dec 4, 2017
1 parent
e1ae14c
commit e77314c
Showing
5 changed files
with
123 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
$instagram = \InstagramScraper\Instagram::withCredentials('username', 'password', '/path/to/cache/folder'); | ||
$instagram->login(); | ||
|
||
$stories = $instagram->getStories(); | ||
print_r($stories); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace InstagramScraper\Model; | ||
|
||
/** | ||
* Class Story | ||
* @package InstagramScraper\Model | ||
*/ | ||
class Story extends AbstractModel | ||
{ | ||
/** @var Account */ | ||
protected $owner; | ||
|
||
/** @var Media[] */ | ||
protected $stories; | ||
|
||
public function setOwner($owner) | ||
{ | ||
$this->owner = $owner; | ||
} | ||
|
||
public function getOwner() | ||
{ | ||
return $this->owner; | ||
} | ||
|
||
public function addStory($story) | ||
{ | ||
$this->stories[] = $story; | ||
} | ||
|
||
public function setStories($stories) | ||
{ | ||
$this->stories = $stories; | ||
} | ||
|
||
public function getStories() | ||
{ | ||
return $this->stories; | ||
} | ||
} |