Obtaining duration for Youtube activities through Youtube-data api - duration

I am using the following api call to obtain activities.
https://www.googleapis.com/youtube/v3/activities?part=contentDetails%2Csnippet&
home=true&maxResults=15&&fields=items&key=<my key>access_token=<my token>
It works fine, except that it does not display the duration in the response. I have tried adding "duration" in the fields parameter, but it doesn't work.
What is the way to obtain the duration in a single request?

Related

Can we get frreeSWITCH outbound call duration from an API

I am trying to find an API or a method that can get the call duration from FreeSWITCH. As my search, we can get call duration from fs_cdr table or calculate the time between CHANNEL_HANGUP - CHANNEL_ANSWER events.
Currently, we are having a problem with the call duration, the time did not match when comparing the value in fs_cdr table and events time. So I am trying to find out if FreeSWITCH provides an API so that we can get the accurate duration or not. I am new to FS so if you can suggest me a way to find it, it would be highly appreciated.

Google play Developer Api - Voided Purchases

I'm facing an 403 error when using this endpoint: https://developers.google.com/android-publisher/api-ref/purchases/voidedpurchases/list
But the error only occurs when I pass the startTime/endTime param, without this parameter I can access this endpoint correctly.
I'd like to know if somebody else know witch permission is missing.
I already gave to my service account permission in google play developer console related with orders and purchases.
https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.voidedpurchases/list
Is it possible you are making an error in how you’re specifying either of the parameters? What does your request look like?
startTime
string (int64 format)
The time, in milliseconds since the Epoch, of the oldest voided purchase that you want to see in the response. The value of this parameter cannot be older than 30 days and is ignored if a pagination token is set. Default value is current time minus 30 days. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.
endTime
string (int64 format)
The time, in milliseconds since the Epoch, of the newest voided purchase that you want to see in the response. The value of this parameter cannot be greater than the current time and is ignored if a pagination token is set. Default value is current time. Note: This filter is applied on the time at which the record is seen as voided by our systems and not the actual voided time returned in the response.
Perhaps you’re specifying a value which is out of the expected range?
At the bottom of the page there is a “Try this api” section so you can try out parameters in their form, so you can see if you’re making some kind of mistake..

YouTube videos stats using Google API YouTube Analytics in one request

Is it possible to get daily video stats for X videos at once?
YT Analytics API does stats only for a channel. Of course I can filter results by video ID (but only one!). I'm getting an error while trying to put "video=1;video=2;video=3" in filter method.
From the documentation of the reports.query endpoint of the YouTube Analytics API, assuming this is the endpoint you are referring to:
The API supports the ability to specify multiple values for the video, playlist, and channel filters. To do so, specify a separated list of the video, playlist, or channel IDs for which the API response should be filtered. For example, a filters parameter value of video==pd1FJh59zxQ,Zhawgd0REhA;country==IT restricts the result set to include data for the given videos in Italy. The parameter value can specify up to 200 IDs.
In other words: only use commas between video IDs (not semicolons), don't repeat the video keyword for each ID and use == instead of =.

What is counting on rate limit of soundcloud?

In my application I have a search list of musics and an embedded player. I need refactor some functions, but I can't understand what is the specific count event. What is counting in rate limit by SoundCloud? Search for list song is measured? Play calls?
In SoundCloud doc text we have:
"Effective July 1, all requests that result in access to a playable stream are subject to a limit of 15,000 requests per any 24-hour time window".
This refer the all JSON's calls only?
A play request is defined as any request against the SoundCloud API which would generate a URL for streaming audio content in its response.
For example, a GET to http://api.soundcloud.com/tracks/3/stream returns a URL which you can use to stream audio content. This request would count against your daily rate limit of play requests.
Hope that helps.

Get ALL the tweets

Is there a way to get ALL tweets(or at least 3000) of a certian user using the Twitter Gem?
Twitter.user_timeline("BarackObama")
Doesn't return as many tweets as expected...
By default, user_timeline only returns the latest (up to) 200 tweets 1 with a single request. You could use multiple requests (getting the ID of the last tweet of each request and using the max_id parameter to request older tweets) but you'll want to read up on rate limiting to ensure that you don't get blocked for excessive requests. I expect your application will need a caching solution of some form to prevent this from happening.

Resources