Giter Site home page Giter Site logo

Comments (6)

NicklasWallgren avatar NicklasWallgren commented on May 29, 2024 1

I have added initial support for the feed endpoint. I'll finish it up tomorrow and create a new release.

You'll be able to access the feeds and tags methods directly from the Instagram instance in the next commit.

Have a look at Instagram\SDK\Client\Features\HashtagFeaturesTrait

Example

// Retrieve the feed
$feed = $instagram->client->feed('INSERT TAG');

$feed->getRankedItems();
$feed->getItems();

// Retrieve the next batch of items 
$result = $feed->next();

from instagram-api.

NicklasWallgren avatar NicklasWallgren commented on May 29, 2024

https://github.com/NicklasWallgren/instagram-api/tree/v0.7.6

The release was a bit rushed since I'm going away for a few days, so the API might change in future updates.

Feed example

// Retrieve hashtag feed
$message = $instagram->feed('instagram', Instagram::$FEED_TYPE_HASHTAG);

// Output top result
var_dump($message->getRankedItems());

Search example

// Search by hashtag
$message = $instagram->search('instagram', Instagram::$FEED_TYPE_HASHTAG);

// Retrieve the results collection
$result = $message->getResults();

// Pick the first entry
$hashtag = current($result);

// Retrieve the hashtag feed
$feed = $hashtag->getFeed();

// Output items
var_dump($feed->getRankedItems());

from instagram-api.

cnizzardini avatar cnizzardini commented on May 29, 2024

Damn, wish I could test this out, but the site I am working on runs off 5.6 and you're using 7.x only language features. I'll test this out again when we get around to upgrading.

from instagram-api.

NicklasWallgren avatar NicklasWallgren commented on May 29, 2024

No worries. Can we close this issue? :)

from instagram-api.

cnizzardini avatar cnizzardini commented on May 29, 2024

Your call.

from instagram-api.

NicklasWallgren avatar NicklasWallgren commented on May 29, 2024

Resolved.

from instagram-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.