Fetch all Calendars From Office 365 Calendar Account - rest

We need to fetch all Calendars in an office 365 calendar account
We basically make an api call to the endpoint
https://graph.microsoft.com/v1.0/users/[logged-in-user-id]/calendars
but it returns only 10 calendars (maximum) when we call the API !?
Any help/tips appreciated !

You can use $top query parameter to get 1 to 999 objects per page. By default every API has its own default pagination count. So you can simply use top query parameter or you can use nextLink which you get in the first API call and use it to get next set of results. See this document. Let me know if this helps.

Related

Snapchat API: Pull campaign stats for an add account, and must include campaign names

Looking trough Snapchat documentation, I couldn't find a way t pull the data with campaign name and only the data for last 7 days.
one of the parameters is start and end time (no way to just request last 7 days)
name is an existing field but only used to create a campaign.
if you try to use the field = name you will get an error
If somebody knows please advise.

Get click count and impressions from lineitemid in Google Admanager (DFP)

I have a line item id stored in my DB, and i want using Admanager API to get click count, impressions number in PHP.
I saw on google groups that it was possible to do it using report generation and then parsing, but there is a faster way to do it (if possible i don't want to make a full report of my campaign)
thank you
This is an example of a Google Ad Manager query where you can get impressions and clicks for a particular order ID (which you can then change for line item ID in order to filter just for it). You can then download the results of that query as a CSV file, and process them as you'd process any CSV file.

Facebook Marketing API Adset Filtering

I am using the Facebook Marketing API and making a call to get the adsets belonging to an adaccount (https://developers.facebook.com/docs/marketing-api/reference/ad-account/adsets/). My issue is that for one of my ad accounts, there are to many adsets available and as such the call is either taking long or has to many pages. Is there a way that i can possiblly add on date filtering to the request so that it will filter out all those adsets outside of the specified dates?
This is the request i am making with a dummy act id:
act_12345678?fields=account_id,name,currency,business{id},adsets{id,name,campaign{id,name,start_time,stop_time,spend_cap,status,insights.date_preset(lifetime){spend}},start_time,end_time,adset_schedule,billing_event,lifetime_budget,budget_remaining,daily_budget,lifetime_imps,status,configured_status,optimization_goal,is_autobid,insights.date_preset(lifetime).as(lifetime_insights){spend}, insights.time_range({'since':'1990-01-01', 'until':'2018-04-26'}).as(insights_to_date){spend}}
It appears that the "filtering" parameter works in this case.
For example, if you want to return all adsets that had a start time greater than 12/31/2017 and less than 01/31/2018, you can try the following.
Note that I had to first convert the start and end dates to a UNIX timestamp:
act_12345678/adsets?filtering=[{'field':'adset.start_time','operator':'GREATER_THAN','value':'1514678400'}, {'field':'adset.start_time','operator':'LESS_THAN','value':'1517356800'}]
You can add the "filtering" parameter to your request URL, and it should then filter both on the dates and the fields you specified.
To convert the dates to UNIX time stamp I used the following link: https://www.unixtimestamp.com/index.php

How to Sort/ Limit the API call for Groups for member list

I see that we can only get 500 members of a group using the graph API.
and the doc says these are "the first 500 members",
Are these sorted by date signed up, or latest 500?
Is there any way I can further limit these to signed up in the last 24 hours/ 1 week?
Is the 500 limit there in using FQL also? (the docs don't specify that )
Is there any way I can further limit these to signed up in the last 24 hours/ 1 week using FQL?
i see that we can only get 500 members of a group using the graph API. and the doc says these are "the first 500 members",
are these sorted by date signed up, or latest 500,???
I’d say by date of joining the group, because otherwise calling them the “first” 500 would make little sense.
Is the 500 limit there in using FQL also? (the docs dont specify that )
From my tests there seems to be no such limit on the group_member table (just tried it for the FB developer group using Grapf API explorer, and my browser froze for about a minute loading the data).
is there any way i can further limit these to signed up in the last 24 hours/ 1 week using FQL?
No, there is no such info as signup date in the FQL table.

get number of updates since a timestamps in facebook

Can we get the number of updates since a particular timestamps using graph APIS? Number of updates might be number of new New feed or Messages.
depending on which api you are calling
When searching for public posts or posts on the user's News Feed, you
can page over the results by using the since, until and limit
parameters. since and until both accept a unix timestamp. When paging
back in time, you should use until in conjunction with limit where
until is the unixtime value of the created_time field in the last
object returned by your previous query. When paging forward in time
you should set since to be the unixtime value of the created_time
field in the first object returned by your previous query. Please
note, you can only search about 1 to 2 weeks back in the News Feed.
/me/feed?since=2+hours+ago&until=now "using strtotime in php"