How to get localized game news from Steam Web API? - api

The Steam Web API has an ISteamNews interface with a GetNewsForApp method that returns the latest game announcements, example request
GET http://api.steampowered.com/ISteamNews/GetNewsForApp/v0002/?appid=570&count=3&maxlength=0&format=json&feeds=steam_community_announcements
And everything works fine, but the news are only in English, and I can't find how to change it.
Some methods have an optional l= parameter, but it does not work for news, although the steam client displays localized news and, according to the documentation, there is full support for localizations.

I'm fairly certain the documentation you're linking is for publishing a news event for Steam partners/developers.
When running the SupportedAPIList call from this documentation: Steam Web API News Documentation
These are the parameters the API currently accepts for non-publishers/devs without an API Key:
{"name":"GetNewsForApp","version":2,"httpmethod":"GET","parameters":
{"name":"appid","type":"uint32","optional":false,"description":"AppID to retrieve news for"}
{"name":"maxlength","type":"uint32","optional":true,"description":"Maximum length for the content to return, if this is 0 the full content is returned, if it's less then a blurb is generated to fit."}
{"name":"enddate","type":"uint32","optional":true,"description":"Retrieve posts earlier than this date (unix epoch timestamp)"}
{"name":"count","type":"uint32","optional":true,"description":"# of posts to retrieve (default 20)"}
{"name":"feeds","type":"string","optional":true,"description":"Comma-separated list of feed names to return news for"}
{"name":"tags","type":"string","optional":true,"description":"Comma-separated list of tags to filter by (e.g. 'patchnodes')"}]}]}
You will have to play around with these parameters to filter the proper responses. Just remember that the Steam API allows only 100,000 requests within a 24 hour period or your IP/API key may be subject to ban or withdrawal. Unfortunately at this time I have been unable to locate what sorts of queries the parameters feeds and tags accept.
Goodluck

Related

How to find only original tracks on soundcloud

I am using soundcloud API for a project but the problem is I get remix of the original songs or cover version, its okay if I get remix and cover version but is there any mechanism that the original one comes as first song in the search result ? I tried searching on Google and read the API documentation but found nothing in this context.
The track object in soundcloud's API actually has the track_type property which has possible values of 'original' and 'remix' among other things. Sadly like most valueable metadata the track object has, content providers neglect to fill the field. So unless content providers start putting more effort into filling in the metadata fields the only option you have is giving songs priority based on words in the title or tags.

What is the maximum results returned for YouTube Data API v3 call

Context
I am in the process of providing some consultancy on doing a HTTP GET using YouTube Data API V3; in order to develop a Windows based application to GET a list of results from Youtube, for say a specific CATEGORY, or a specific TAG.
We are open to using any programming language(I'm from a C++ background and am hoping You tube will support direct HTTP connections without using Google client SDK and so on) to connect to YouTube and (HTTP) GET data.(Once a month or so, so YouTube API quotas should not be problem).
The Issue
We are being told by some of my client's web developers that YouTube API v3 will only return a maximum of 500 records/results, for say a query that returns JUST the Total viewers, the Video's link, and basic meta data such as that.
S, say I wish to find 5,000 results for category "House music" or "basketball" - and I have the Developer Key etc are all set up, would that be possible?
If so, what GET fields would I need to populate(such as "max_results_per_page")?
Thank you.
The API won't provide more than ~500 search results for any arbitrary query. It's by design. Technically, it means that the nextPageToken field won't be returned once you hit ~500 results. No additional parameter can change that.
If you want more than ~500 results for a query, you have to split it into more specific sub-queries. I'd suggest using the publishedAfter and publishedBefore parameters to achieve that, but feel free to experiment with the other ones here.
This only holds for the search-Query. Other queries like "PlaylisItem:list" deliver more results. I have tested with 100.000 items to get the videos of a playlist.

count how many times URL was shared in twitter

Is it possible to count how many times some URL was twitted in some period of time?
You can use the Twitter Search API and search for URL's, then examine the Tweet objects to find the ones in your date range. Use the GET search/tweets call. This is limited to the past 6-7 days in their index.
You can also write an app to watch the Twitter stream for the URL over a period of time, then count the occurrences. This can be done using the Twitter Streaming API using the POST statuses/filter call. Specify the string you are watching for and matching results will stream.
In Ruby, for example, you can do this using the Twitter Gem. It's best to search for known URL-shortened versions as well as the full URL. You can control this somewhat by registering the URL with several known URL shorteners in advance, so you know what to watch for.

Eventbrite API - event_search - finding best matches

i've noticed that for certain keywords, the Eventbrite website shows relevant events, but the API returns a lot of irrelevant events.
some examples are: "arts", "health", "auction"
the results shown on the website all have the keywords appearing in the Title/Name of the event, however the API returns events as long as the keywords are in the title and/or description.
MY QUESTION IS: how do I use the API to only get back events which have the keyword appearing in the title?
I'm trying to get the best matching events.
event_search currently does a full-text search over the title and description fields.
Eventbrite is currently working on connecting their event_search interface to the same back-end that powers their web-based directory service
I'm sure they'll make an announcement via #EventbriteAPI when it's ready.

Flickr API get a limited number of comments

I'm using the Flickr API's flickr.photos.comments.getList method to get a list of comments of some photos from their site. The photos I am using are off of the flickr.interestingness.getList method and generally have hundreds of comments and favorites. I'd only like to get 8 comments per request, is there a way to do this?
Also, I need some clarification on the min_comment_date vs max_comment_date arguments. Say I want to get only photos within the last 24 hours, which argument would I use and what would I supply to it?
No,the flickr api doesn't allow list restrictions of comments via the web service api.
Other commands have limiters like page/per_page, but not the comments-list; at least not at the moment.
About the date arguments: flickr accepts a unix timestamp or mysql datetime for the date fields, also in this case. Normally you can create the timestamps programatically in most programming languages, for testing you can convert values manually via http://www.unixtimestamp.com.
hope this helps.