I have one question related to the report from YouTube Analytics. Traffic source detail report has a maximum limit of 25.
Documentation: https://developers.google.com/youtube/analytics/v1/channel_reports#traffic-source-reports.
And there is no token for the next page in the response to fetch all items and not only 25.
Please help guys to get all items up to 500.
Note: This report requires you to set the max-results parameter to a integer value of 25 or less. Unlike most other reports, this report also requires you to specify a value for the sort request parameter.
Google APIs don't all allow for paging. In this case you are max able to see 25.
There is no nextpagelink or pageid then there is now way to get additional results.
Related
I am using Graph API to extract all the incidents and advisories from Microsoft but I encounter some issues, and I will be very happy if you can help me.
I am using the GET Method using the URL
https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues but in the output, I can see that not all incidents are present, and I can see that there is present pagination in the output https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues?$skip=100, can you guys help me how I should filter this to extract all the incidents from the API?
You'll need to make multiple calls until the response provides no further link for you to retrieve further records.
https://learn.microsoft.com/en-us/graph/paging
As is described in the above documentation ...
You can retrieve the next page of results by sending the URL value of the #odata.nextLink property to Microsoft Graph.
As previously stated, once you have reached the last page, you will no longer have a nextLink value to retrieve the next page.
I am trying to retrieve all users from AD using Microsoft Graph APIs.
https://graph.microsoft.com/v1.0/users
But this is returning only some top n rows from the whole users list.
I guess its using some pagination there. But didn't find how to specify page number or those details as a parameter within the query.
https://learn.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http
Ms Graph cant show all users in the same page as it may cause threshold issues if the user count is too high.
you need to use paging to achieve this i.e., to get all the users you can achieve it with the help of #odata.nextLink please refer Ms Document for more details.
I want to use the Github search API Restfully in my iOS application to query public repositories based on 'language' (programming language) as the primary parameter for the search.
From the API documentation i can understand that the following api gives me what i need.
https://api.github.com/search/repositories?q=tetris+language:assembly&sort=stars&order=desc
Although, this returns 370 such repositories for the particular language.
I want to implement pagination in the iOS app so that i can fetch around 10-30 entires at a time only. I have seen that github provides pagination for some of their Api's.
However when i try the following api's with the 'page' and 'per_page' included in the parameter i still get the same results, not limited to the page or the per_page i want.
https://api.github.com/search/repositories?q=tetris+language:assembly&sort=stars&order=desc&page=1&per_page=10
Does the github api provide pagination for this search api?
If so what am i missing? How do i go about using it?
The total_count is the total number of repositories, not the number of itens that are in the JSON.
The pagination is working as expected, try this and see the result, the number of itens in each request is 10 (as you set in the last parameter "per_page)
Do a crtl+f by full_name, it will be easier to see the number of itens per request
Check the result of this 2 requests.
https://api.github.com/search/repositories?q=tetris+language:assembly&sort=stars&order=desc&page=1&per_page=10
https://api.github.com/search/repositories?q=tetris+language:assembly&sort=stars&order=desc&page=2&per_page=10
I am working on a project which requires getting tweet and user information from twitter. I can't even test the current system because I keep hitting twitter rate limit. Is there any way around it?
Basic information that I am looking to extract from each status is:
Status text
User follower count
User following count
Retweet count
Geo location co-ordinates
I am using Twitter4J API to do this.
Any help will be appreciated. Thanks in advance.
EDIT
I am using twitter's search API to get list of tweets.
One option is to use a Twitter Data Reseller (e.g. GNIP) who can sell tweets.
Another option is to maximize your use of the API. Here are some tips:
Check Rate Limit Status for each API you're use to make sure you don't go over and when the rate limit resets (currently every 15 minutes).
Look at the parameters to make sure you request a count of the maximum number of tweets for that API. e.g. a count can default to 20, but you can set it to 200, depending availability and limits on the specific endpoint. This potentially reduces the number of queries you have to make.
Page your results according to the Twitter's Working with Timelines guidance. Use SinceID and MaxID to make sure you're only requesting new tweets. This could reduce requests by reducing the number of tweets you need (through increasing the opportunity to stay within max count) and reducing the number of requests by avoiding queries for tweets you already have.
Essentially, you want to examine endpoint parameters with a perspective for how to decrease bandwidth and reduce the number of queries you have to make.
When querying the YouTube Analytics API for demographics for a channel for a 1 day range (metric:viewerPercentage, dimensions:ageGroup,gender) in some cases no rows are returned. The api IS returning views for that day however.
2 reasons for this come to mind:
1. The data is not available yet because it is still being processed.
2. There is no known demographics for that (i.e. the gender and age of the user are not known)?
Am I safe to assume it's not (1) in this case because a query for views did return results? If I can't assume on then is it true that there's no difference in the response/results between "not processed" and "processed but all users are of unknown demographics?"
In other words if, when (2) were the case, the API would return a row with all zero's 0 for each demographic, that would enable us to interpret things correctly (but I'm pretty sure that's not how API queries with a dimension work).
Thanks for any guidance!
I can't provide any hard-and-fast guidance about the YouTube Analytics data processing pipeline, i.e. whether the demographic data will always be available at exactly the same time that the view count data is available in a report.
To get a more authoritative answer about this sort of specific question, I'd recommend going to the YouTube Analytics web interface (http://youtube.com/analytics) and try running an identical report from there. The web interface normally gives you some warning if you're requesting a report that relies on data that isn't yet available.