Category descriptions in reponse are too vague - here-api

If you request a bakery using discover/search api, matches are returned with a general category, eg "Food and Drink". Could the full category-id be returned with reponse? Eg, 600-6300-0244 in the case of bakery.

If you add the parameter &cs=pds you will get further information back e.g. also the category-id.

Related

USA 'aka Title' returned as default?

Trying to get the Title for "Blood Oath" from 1990 https://www.imdb.com/title/tt0100414/ .In this example am using Jupyter, but it works the same in my .py program:
movie = ia.get_movie('0100414')
movie
<Movie id:0100414[http] title:_Prisoners of the Sun (1990)_>
Am I doing something wrong? This seems to be the 'USA aka' title. I do know how to get the AKA titles back via the API, but just puzzled as to why it's returning this one. On the IMDB web page "Blood Oath" is listed - under the AKA section - as the "(original title)". Thank you.
What you do is correct.
IMDbPY takes the movie title from the value of a meta tag with property set to "og:title". So, what's considered the title of a movie depends on the decisions made by IMDb.
You can also use "original title" key, that is taken from what it's actually shown to the reader of the web page. This, however, is even more subject to change since it's usually shown in the language guessed by the IMDb web servers using the language set by a registered user, the settings of your browser or by geolocation of the IP.
So, for example, for that title I get "Blood Oath" via browser since my browser is set to English and "Giuramento di sangue (1990)" if I access movie['original title'] (geolocation of my IP, I guess)
To conclude, if you really need another title, you may get the whole list this way:
ia.update(movie, 'release info')
print(movie.get('akas from release info'))
You will get a list that you can parse looking for a string ending in '(original title)'
(disclaimer: I'm one of the main authors of IMDbPY)

How to get a LinkedIn Group Post "content" through API, not just the title

When starting a Group Discussion through the LinkedIn website you can enter a postTitle and (optional) postText
However when querying this post through the LinkedIn API only the "title" is returned.
https://api.linkedin.com/v1/posts/{post-id}
Tested from https://apigee.com/console/linkedin to confirm it wasn't just my script with issues.
Is there an extra parameter I can pass to the API to get this "text" field on a Group Discussion post?
Thanks
You need to use the field selectors to specify the particular fields that you want returned from your call.
For example:
https://api.linkedin.com/v1/groups/12345:(id,name,site-group-url,posts:(id,summary,creator))
Please also note that as of May 12th, 2015, the API endpoint for Groups will no longer be publicly available. See the following blog post for more details: https://developer.linkedin.com/blog/posts/2015/developer-program-changes

pagePath and nextPagePath in analytics api not working

I try to get a list of pages people go after visiting the selected page. pagePath is a starting page, nextPagePath is the result list of pages I'm interested in. I included a filter to show only one starting page. But the result I get is confusing:
What am I doing wrong?!
Use ga:previousPagePath instead of ga:pagePath. For the reason to me unknown, ga:pagePath and ga:nexPagePath refers in GA API to the same thing.

On Phabricator get the comment from a feed story

I'm using Phabricator's feed.http-hooks feature to post messages in a dev chat room whenever relevant events happen in the news feed. This works great for showing that "Alice created diff D12345" or "Bob updated diff D54321."
When someone comments on a diff, I want to extract the comment text from the story. Whenever there's a comment, Phabricator sends HTTP POSTs to my feed.http-hooks server containing parameters like the following:
storyID=42
storyType=PhabricatorApplicationTransactionFeedStory
storyData[objectPHID]=PHID-DREV-blahblah1
storyData[transactionPHIDs][0]=PHID-DREV-blahblah2
storyAuthorPHID=PHID-USER-blahblah3
storyText=tom added a comment to D12345: Some random diff.
epoch=1412243745
My question is, how can I get the actual text of the comment? I've tried using Conduit's phid.query method to look up some of these PHIDs, but that hasn't gotten me anywhere. I know this is possible because the comment shows up in the actual "Recent Activity" feed on the Phabricator site. Halp.

Page not found - show other possibles. Return 404 or 301?

If a users follows a dead link to my site and requests a record which is no longer valid I would like to be able to provide them with a list of other potential records which they might have been searching for. Most of my records get "soft" deleted so I am normally able to derive search data from the ID in the request - but never the new ID of the record (records can be moved but there is no link between the old a new records, other records may simply not exist any more).
My gut instinct is to return a page of content with the possible records along with a 404 header to hopefully get search engines to drop the index for that URL.
The other option would be to redirect (301 - or even 303??) to this results page.
I'd advocate a status code of 300 to indicate multiple choices (per RFC)
If you have one target to redirect to, use a 301 to redirect to it.
If you have multiple options, I would go with a 300 - it indicates multiple choices.
In my opinion you should go with the 404, since you stated you provide a list with multiple items. A redirect should be used with one possible item only.
update: I totally forgot about 300... use that one as mentioned before by Rowland Shaw
By "records" - do you mean vinyl?
For the "SEO" tag in your question - if you're running an eCommerce store and driving traffic keep the 200 OK and display the record as (permanently) out-of-stock (as you suggest) and offer alternate "records" - never drop an indexed product link for a "good" product.
I'd only advocate a "301 Permanent Redirect" if the product is genuinely damaging to your site / business.
For the "user-experience" - again keep the 200 OK - the user doesn't care what status is being returned.

Resources