Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Instagram/Hydrator/ProfileHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public function hydrateProfile(\StdClass $data): void
$this->profile->setVerified($data->is_verified);
$this->profile->setMediaCount($data->edge_owner_to_timeline_media->count);

if (property_exists($data, 'category_name') && $data->category_name !== null) {
$this->profile->setCategoryName($data->category_name);
}

if (property_exists($data, 'biography')) {
$this->profile->setBiography($data->biography);
}
Expand Down
22 changes: 22 additions & 0 deletions src/Instagram/Model/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class Profile
*/
private $fullName;

/**
* @var string
*/
private $categoryName;

/**
* @var string
*/
Expand Down Expand Up @@ -128,6 +133,23 @@ public function setFullName(string $fullName): void
$this->fullName = $fullName;
}

/**
* @return string|null
*/
public function getCategoryName(): ?string
{
return $this->categoryName;
}

/**
* @param string $categoryName
* @return void
*/
public function setCategoryName(string $categoryName): void
{
$this->categoryName = $categoryName;
}

/**
* @return string
*/
Expand Down