Skip to content

Update Item.php fix return getUser function#62

Open
nimabm wants to merge 1 commit intoNicklasWallgren:masterfrom
nimabm:master
Open

Update Item.php fix return getUser function#62
nimabm wants to merge 1 commit intoNicklasWallgren:masterfrom
nimabm:master

Conversation

@nimabm
Copy link

@nimabm nimabm commented Dec 25, 2021

fix return getUser function

fix return getUser function
@NicklasWallgren
Copy link
Owner

Hey, thanks for the contribution.

It might be a good idea to implement an DTO class, instead of type hinting it as an array.
We could probably add a new class Instagram\SDK\Response\DTO\Feed\User containing the actual fields, e.g.

 [pk] => 301061552
            [username] => svt
            [full_name] => SVT
            [is_private] => 
            [profile_pic_url] => https://scontent-arn2-1.cdninstagram.com/v/t51.2885-19/s150x150/14596904_1693637237631948_3216786425731088384_a.jpg?_nc_ht=scontent-arn2-1.cdninstagram.com&_nc_cat=1&_nc_ohc=PfmGoi3PV2QAX9XDPk-&edm=ABmJApABAAAA&ccb=7-4&oh=00_AT89DGBWxDHryou3aWJAdI5o5Nz0rvOOpiNFzFchWe9BqA&oe=61CE8384&_nc_sid=6136e7
            [profile_pic_id] => 1391249175462635481_301061552
            [is_verified] => 1
            [follow_friction_type] => 0
            [has_anonymous_profile_picture] => 
            [is_unpublished] => 
            [is_favorite] => 
            [has_highlight_reels] => 
            [account_badges] => Array
                (
                )

            [latest_reel_media] => 0

Have a look at Instagram\SDK\Response\DTO\General\User for reference,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants