How long have my Google Play subscribers been subscribers? - google-play

Google will now take 15%, not 30% perecent, for subscriptions that have lasted for over a year. See this.
We want to know how many people of our subscribers this affects.
I have found this API call but it doesn't seem to give us all our subscribers.
Is there a way to find out how long our subscribers have been subscribed for? We want to use this information for accounting.

Use Google Play Develop API's Purchases.subscriptions: get. A successful call returns a Purchases.subscriptions file resource which contains startTimeMillis:
startTimeMillis long Time at which the subscription was granted, in milliseconds since the Epoch.
which seems to be what you're looking for.

Related

What is "sf_max_daily_api_calls"?

Does someone know what "sf_max_daily_api_calls" parameter in Heroku mappings does? I do not want to assume it is a daily limit for write operations per object and I cannot find an explanation.
I tried to open a ticket with Heroku, but in their support ticket form "Which application?" drop-down is required, but none of the support categories have anything to choose there from, the only option is "Please choose..."
I tried to find any reference to this field and can't - I can only see it used in Heroku's Quick Start guide, but without an explanation. I have a very busy object I'm working on, read/write, and want to understand any limitations I need to account for.
Salesforce orgs have rolling 24h limit of max daily API calls. Generally the limit is very generous in test orgs (sandboxes), 5M calls because you can make stupid mistakes there. In productions it's lower. Bit counterintuitive but protects their resources, forces you to write optimised code/integrations...
You can see your limit in Setup -> Company information. There's a formula in documentation, roughly speaking you gain more of that limit with every user license you purchased (more for "real" internal users, less for community users), same as with data storage limits.
Also every API call is supposed to return current usage (in special tag for SOAP API, in a header in REST API) so I'm not sure why you'd have to hardcode anything...
If you write your operations right the limit can be very generous. No idea how that Heroku Connect works. Ideally you'd spot some "bulk api 2.0" in the documentation or try to find synchronous vs async in there.
Normal old school synchronous update via SOAP API lets you process 200 records at a time, wasting 1 API call. REST bulk API accepts csv/json/xml of up to 10K records and processes them asynchronously, you poll for "is it done yet" result... So starting job, uploading files, committing job and then only checking say once a minute can easily be 4 API calls and you can process milions of records before hitting the limit.
When all else fails, you exhausted your options, can't optimise it anymore, can't purchase more user licenses... I think they sell "packets" of more API calls limit, contact your account representative. But there are lots of things you can try before that, not the least of them being setting up a warning when you hit say 30% threshold.

How short are "short periods of time" in Google calendar API for real?

I'm developing an application, which needs to use calendar and I've decided to try a ready-made solution - Google Calendar API. I'm making calls from my backend to google and I only store calendars' and ids in my database, everything else is stored in google. So I'm writing a proxy basically and everything is going ok, but I've bumped into this article https://support.google.com/a/answer/2905486?hl=en, and now I'm really worried about those "short periods of time" in exceeding limits. I haven't found more accurate numbers. Well, if those "short periods of time" are ~1h, then I'm in the trouble and I need to implement my own calendar system. Can anyone dispel my doubts? This is not a pet-project.
Answer:
There's no public official information regarding the exact period this is referring to.
Nevertheless, after some testing, it seems like the short periods of time are longer than what your workflow would require.
Research:
Since the limit that is troubling you is calendar creation (from Avoid Calendar use limits):
If you create more than 60 new calendars in a short period, your calendar might go into read-only mode for several hours.
I did some tests with a Workspace account, in order to see what's the maximum rate of calendar creation that won't result in this limit being exceeded.
More specifically, I tried creating calendars periodically, with several different periods, ranging from 5 seconds to 15 minutes.
For most of these periods (from 5 seconds to 10 minutes at least), the following exception started showing up after creating 40-something calendars approximately:
You have been creating or deleting too many calendars or calendar events in a short time
After this, no more calendars could be created for some time.
For 15-minute period, I got the error after creating around 80-something calendars, so I guess the maximum rate of creation is close from there (1 calendar created every >15 minutes). Since this rate is not disclosed, though, it could change without notice, so take this with a grain of salt.
The original poster, GorgeousPuree, also made some testing, with results in accordance with what I got (see comment):
I also made my expirements and I've got a timeout after 25 calendars in 1 and 3 minutes intervals.
Conclusion:
In any case, the short period seems to be way too long for the worst case scenario:
60 calendars in 5 mins

Calendar for online meetings

I need an online application in which I share to a bunch of people (by their emails) a time period, with a certain granularity. Let's say one week from day X to day Y, with time slots of 1 hour and half, and asking people to fill them in order to book their slot (they should see slot availability). Is there a free web app that is capable of doing that?
I regularly use google calendar to invite/share with my colleagues for the meetings. It allows them to respond yes/no to my invitation. I also use it for scheduling my busy work slots so that it will remind me of at the right time. If you need to know more about setting up sharing appointment slots in Google calendar, you can refer at
https://support.google.com/calendar/answer/190998?hl=en
There are also other meeting scheduler apps that might suits well for your needs; please see the following.
Reference 1: https://zapier.com/blog/best-meeting-scheduler-apps/#timebridge
Reference 2: http://mashable.com/2012/09/20/shared-calendar-apps/#FOLZrYKZ.8qE

Pricing: Are push notifications really free?

According to the parse.com pricing page, push notifications are free up to 1 million unique recipients.
API calls are free up to 30 requests / second.
I want to make sure there is no catch here.
An example will clarify: I have 100K subscribed users. I will send weekly push notifications to them. In a month, that will be 4 push "blasts" with 100K recipients each. Is this covered by the free tier? Would this count as 4 API calls, 400K API calls, or some other amount?
100k users is 1/10 the advertised unique recipient limit, so that should be okay.
Remember that there's a 10sec timeout, too. So the only way to blast 100k pushes within the free-tier resource limits is to create a scheduled job that spends about 2 hours (that's a safe rate of 15 req/sec) doing pushes and writing state so you can pick up later where you left off.
Assuming there's no hidden gotcha (you'll probably need to discover those empirically), I think the only gotcha in plain sight is the fact that the free tier allows only one (1) scheduled job. Any other long-running processing -- and there are bound to be some on 100k users -- are going to have to share the job, making the what-should-this-single-job-work-on-now logic pretty complex.
You should take a look at the FAQ for Parse.com:
https://www.parse.com/plans/faq
What is considered an API request?
Anytime you make a network call to
Parse on behalf of your app using one of the Parse SDKs or REST API,
it counts as an API request. This does include things like queries,
saves, logins, amongst other kinds of requests. It also includes
requests to send push notifications, although this is seen as a single
request regardless of how many recipients are targeted. Serving Parse
files counts as an API request, including static assets served from
Parse Hosting. Analytics requests do have a special exemption. You can
send us your analytics events any time without being limited by your
app's request limit.

Is it possible to get invoice/billing data using Facebook Ads Api?

Can't find any information about invoices/billing in Facebook Ads Api documentation.
Is it possible at all to get Facebook ad account invoice data using any api?
I know I can get amount spent by ad account per day. Unfortunatelly this is not always identical to the amount on the invoices.
Unfortunately I don't think there is an API for this.
Spend is a little tricky to get right. Facebook can retroactively change the numbers, apply credits to your account, and so on, so you can't really rely on any spend numbers retrieved via the API being 100% accurate.
We ended up setting up a task that runs every night and retrieves spend data for the past 28 days. This was the only way we could ensure that our numbers matched FB's exactly. If you require a similar level of accuracy you might want to consider setting up something along those lines.

Resources