How can i get via AdSense Api the payment per Month and per Site - adsense-api

1) Hey i run API AdSense and im trying to get the total payment per month but filtered by site as well.
At the moment i can only extrect the amount of payment per month via https://www.googleapis.com/adsense/v1.4/accounts/accountId/payments but there is no way to filter there by Site
I can filter by site in this API https://www.googleapis.com/adsense/v1.4/accounts/accountId/reports but the payment that i get there are not accurate.
2) How can i get from the API the "InvalidTraffic" parameter per site ?
Thanks a lot in advance

1) Reporting is the correct way to get this information. Common causes of metric discrepancies are using the wrong time zone and using the wrong currency type. Also, be aware that "earnings up to yesterday are accurate, [but] more recent earnings are estimated due to the possibility of spam, or exchange rate fluctuations."
2) Invalid Traffic isn't exposed in the API.

Related

Limit quantity number for a stripe product

I am currently setting-up stripe for a SaaS company to be able to order recurrent products with a tiers price based on volume (see https://stripe.com/docs/api/prices/object#price_object-tiers_mode). I would like to limit the maximum number of units allowed (a user can only order up to 100 units and after the checkout is impossible). Has someone found a way to do it?
Thanks for your help,
Best
This is something that would be implemented by your integration, checked & enforced via your application logic. If your customer reaches 100 units, you would prevent them from increasing it or alternatively return an error from your server when they try to initiate payment.
Restricting quantity like you ask is not supported by the Stripe API.

How to get daily usage of Youtube API qouta?

I am using youtube data API and I didn't find anything related to the overall daily usage of API limit.
I can check the same on the console and I visited the below link but here I can only calculate the stats from the youtube web portal.
https://developers.google.com/youtube/v3/determine_quota_cost
Is there any means that I can get the overall daily usage of from any API provided by youtube.
Yes. Go to here, click on the menu in the top left corner, IAM & Admin and then Quotas.
Recently I had this requirement too. But then I moved on as it was not a blocker for me.
Alternatively I would suggest keeping track of quota units consumed. You can easily calculate how many quota units are consumed from the chart in the link you provided. You can get the number of quota units left by subtracting the sum of units consumed from 10000 (Current default limit, or any number assigned to your account if you requested for more).
The quota gets reset every midnight PST.
FYI, the api does respond with an HTTP 403 and error code 403 with reason = dailyLimitExceeded. Once you encounter this then you can stop sending out more api calls till midnight.
If you ever get to know of an API endpoint please update this question so that it helps people like us.

Is there a way to get earnings from paypal sdk python?

So I have my admin page for my website and I use Paypal to process payments and I was wondering if there is a way to get a report with the total earning. I read the documentation but I only found generating transaction reports.
In case I didn't make my self clear what I mean is I request the API and it returns a float or int with the total earnings so I can display the amount on my admin page.
You might be able to calculate a running total minus fees by setting up and listening for transaction Webhooks, specifically PAYMENT.CAPTURE.COMPLETED
I would just use the Reports features in PayPal.com rather than obsessing about building your own counter.

Instagram API Change May 2016?

We are having problems with returning results from Instagram API for location (lat, lng) and hashtag searches. It only stopped working in the last couple of weeks.
Has Instagram changed API without warning?
PLEASE help us.
Does anyone also have a sample get call for hashtags?
The script is wtitten in Python.
Thank you
Coby
Theres a new Instagram API update that happened in June 2016.
refer dialogfeed doc link
I really wonder how they can increase traffic on insta by setting up stringint limitations. :-(
The Doc stats - "This aims to limit third party inadequate uses of Instagram user contents and to increase trafic on Instagram."

Wunderground API - Historical Forecasts?

Is there a way to get historical forecasts from the wunderground API? For instance, find out the predicted high temperature 5 days from an arbitrary date in the past?
If you go to the Wunderground website, under Key Settings, there is a spot to request access to history data, in the area where you purchase a key. Fill out the form, and you can expect a response within a couple days telling whether you have access to history data. Once you do, look under Documentation to find out how to use it.
You can sign up for a developer account (free) and that gives you access to 500 calls/day or 10 calls/minute. You can use that to make calls to the history API and test it.
http://api.wunderground.com/weather/api

Resources