Additional attribute by feed_type ?
Closed this issue · 6 comments
Hello.
How i can add additional attribute/parameter, to check feed_type.
My news should be only from specific appid and with feed_type 1
Issue: I got news from other game portal.
+"feedlabel": "Rock, Paper, Shotgun"
+"date": 1514919601
+"feedname": "rps"
+"feed_type": 0
+"appid": 550
For now i fixed like this, but i hope for better solution
foreach($news as $key=>$new) { if($new->feed_type == 0){ unset($news[$key]); } }
What call are you using to get this?
$appID = 518790;
$news = Steam::news()->GetNewsForApp($appID, 21)->newsitems;
So, that method in this code base just returns what Steam gives us raw. No transforming of the data happens. If you want, you could make a pull request to convert it to a collection, then you could just do a filter.
$news->whereNot('feed_type', 0);
I'm not entirly convinced, it's as easy as $news = collect($news)->whereNot('feed_type', 0);
Actually I don't see the benifet of this when it's so easy convert anyway.