Page 1 of 1

$/feedItems/open API

Posted: Tue Jun 01, 2010 7:02 am
by kevotheclone
I'm not sure that this is really a bug, but let's discuss it...

I've started using the $/feedItems/open API to open feed items that share the same <category> element value (Do you remember the "Category Cloud" Channel Report I emailed you a few months ago?).

I've noticed that when there are multiple feed items that come from the same domain and I pass their feed item IDs ({%ITEM-METADATA% awasuId}) to the $/feedItems/open API as a comma delimited list, only the last feed item for a domain gets opened in a tab.

So if I passed 6 feed item IDs to the API that originate from 2 different domains, only 2 tabs will open with 2 web pages of the feed items displayed; the feed items displayed appear to be from the last feed item ID passed for each domain. It doesn't matter if the feed item IDs are grouped together by domain, or if the different domain's feed item IDs are interspersed.

I even tried calling the $/feedItems/open API multiple times passing a single feed item ID value with each call, but it seems to exhibit a similar behavior. When I call the $/feedItems/open API with a feed item ID from an domain already opened in a tab, the tab is reused.

I thought you should know in case you feel it's a bug that should be fixed or if the $/feedItems/open API documentation needs to be clarified. Maybe this is my design, but it's not clear in the documentation. :?

Re: $/feedItems/open API

Posted: Tue Jun 01, 2010 8:43 am
by support
kevotheclone wrote:I'm not sure that this is really a bug

You're right, this isn't exactly a bug, Awasu is broken as designed :roll:

What's happening is that when you open a feed item, Awasu tries to open it in the window of the channel that it came from. You can see this happening by calling the API with the parent channel open in Awasu, then trying it again with the window not open. Awasu does open all the feed items you pass in, which is why it returns "OK" for each one, but because it happens so fast, you only ever see the last one.

I've just cut the 2.4.3.alpha1 release so this'll have to wait until alpha2. A reasonable workaround would be to call $/openUrl (which opens a new browser tab each time) - this is what the eventual fix will probably do anyway.

Re: $/feedItems/open API

Posted: Wed Jun 02, 2010 1:08 am
by kevotheclone
Thanks, your explanation makes sense to me, you might just try to add another sentence or two to the API documentation.

$/openUrl could work for me as I already have the feed items' URLs.

I may suggest an alternative in the Feature Requests forum, but I don't think it would be easy for you to do, and it has it's own caveats which may outweight the benefits.

Re: $/feedItems/open API

Posted: Wed Jun 02, 2010 10:46 am
by support
kevotheclone wrote:Thanks, your explanation makes sense to me, you might just try to add another sentence or two to the API documentation.

Or I could just fix Awasu so that it works in a more sensible way :roll:

kevotheclone wrote:$/openUrl could work for me as I already have the feed items' URLs.

I'll probably fix <tt>$/feedItems/open</tt> so that the first item opens in the channel's window and any subsequent ones open in new tabs.

kevotheclone wrote:I may suggest an alternative in the Feature Requests forum, but I don't think it would be easy for you to do, and it has it's own caveats which may outweight the benefits.

Hey, don't let that stop you... :whip: