How to get basic calls, messages and data usage statistics in Windows Phone? - windows-phone-8

How to get basic calls, messages and data usage statistics in Windows Phone?
I need to get some basic phone usage stats in my app:
total duration of outgoing calls in last month
total number of sms messages sent in last month
total mobile data usage in last month
How can I do that in Windows Phone? Is it even possible?

Related

User based rate limit implementation

I have an express.js backend server, and I am using MySQL to store the users' information. I want to implement an API rate limit that limits a certain number of requests a user can make in a minute; however, if I store the request count per minute in a database and get the count every time an API request is made, this system can easily be abused. Is there a better way to do this?

How to know the size of a page for data transfer calculations

I'm trying to calculate the total number of Giabytes that my website will need for outbound data transfer before deciding whether I will host in AWS or other hosting companies, since AWS only provide a monthly free limit of 15 GB outbound. I need to know the size of a page visit, and then will multiply this by the total number of visits per month. I'm still having my website as a localhost, so I couldn't use the online tools yet. I tried to use "Save as" which downloaded the page along with all CSS files and images, so could this be an accurate size of a page ?

Amazon API submitting requests too quickly

I am creating a games comparison website and would like to get Amazon prices included within it. The problem I am facing is using their API to get the prices for the 25,000 products I already have.
I am currently using the ItemLookup from Amazons API and have it working to retrieve the price, however after about 10 results I get an error saying 'You are submitting requests too quickly. Please retry your requests at a slower rate'.
What is the best way to slow down the request rate?
Thanks,
If your application is trying to submit requests that exceed the maximum request limit for your account, you may receive error messages from Product Advertising API. The request limit for each account is calculated based on revenue performance. Each account used to access the Product Advertising API is allowed an initial usage limit of 1 request per second. Each account will receive an additional 1 request per second (up to a maximum of 10) for every $4,600 of shipped item revenue driven in a trailing 30-day period (about $0.11 per minute).
From Amazon API Docs
If you're just planning on running this once, then simply sleep for a second in between requests.
If this is something you're planning on running more frequently it'd probably be worth optimising it more by making sure that the length of time it takes the query to return is taken off that sleep (so, if my API query takes 200ms to come back, we only sleep for 800ms)
Since it only says that after 10 results you should check how many results you can get. If it always appears after 10 fast request you could use
wait(500)
or some more ms. If its only after 10 times, you could build a loop and do this every 9th request.
when your request A lot of repetition.
then you can create a cache every day clear context.
or Contact the aws purchase authorization
I went through the same problem even if I put 1 or more seconds delay.
I believe when you begin to make too much requests with only one second delay, Amazon doesn't like that and thinks you're a spammer.
You'll have to generate another key pair (and use it when making further requests) and put a delay of 1.1 second to be able to make fast requests again.
This worked for me.

Maximum number of requests for free tariff on openshift

I use the free tariff for the openshift of backend my application.
In the example given on page https://www.openshift.com/products/pricing load of the following characteristics:
15 pages / second
Hundreds of articles
~ 50k visitors per month
but does that mean that the application will be disabled until next month, if the number of requests to it are exceeding the allowable number? and if so, what is the number?
That does not mean the application will be disabled. That is just letting you know about the amount of traffic that a small gear can handle.

Is Google map geocoding limited to 2500 per day or per 24 hours?

Does anyone know if the limit touches an entire day or a period of 24 hour starting from the first request you do and until tomorrow at the same hour in the day?
Example:
I make 2500 request today from 14h00 to 19h00.
Result:
Tomorrow at 2h00AM I will be able to make more request?
OR
I have to wait until 19h00 tomorrow before I can make more request?
Thank you.
According to the documentation, the usage limits are :
Users of the free API: 2,500 requests per 24 hour period.
Maps for Business customers: 100,000 requests per 24 hour period.
We are speaking about a 24 hour period, so in your example, if you make 2500 requests from 2PM to 7PM, you won't be able to do any request since tomorrow 7PM.
I found another page where they talk about the rate and daily limit.
Usage Limits for Google Maps API Web Services
Sending too many requests per day. Sending requests too fast, i.e. too
many requests per second. Sending requests too fast for too long or
otherwise abusing the web service.
If you exceed the usage limits you will get an OVER_QUERY_LIMIT status
code as a response.
This means that the web service will stop providing normal responses
and switch to returning only status code OVER_QUERY_LIMIT until more
usage is allowed again. This can happen:
Within a few seconds, if the error was received because your
application sent too many requests per second.
Some time in the next 24 hours, if the error was received because your application sent too many requests per day. The time of day at
which the daily quota for a service is reset varies between customers
and for each API, and can change over time.
Upon receiving a response with status code OVER_QUERY_LIMIT, your
application should determine which usage limit has been exceeded. This
can be done by pausing for 2 seconds and resending the same request.
If status code is still OVER_QUERY_LIMIT, your application is sending
too many requests per day. Otherwise, your application is sending too
many requests per second.
On the same page there is also a video.
:-)
Maps API for Business: Using the v3 Geocoding API
Update: The limit is now 5000 queries per day for the free tier.