Reverse Geocoding with Worklight - ibm-mobilefirst

I'm currently working on a Worklight Project that deals with location based services. I want to be able to get the ZipCode of an user's current location for the iOS platform specifically. I researched online and there are many ways to approach this. I currently have it implemented using a custom cordova plugin using native location manager features and retrieve the zip code through reverse geocoding. This approach seem like I'm doing it the long way. I noticed that google provides an api call for the reverse geocoding by just supplying the lat and long. However, there is a limit to how many calls you can make.
Users of the free API:
2,500 requests per 24 hour period.
10 requests per second.
Maps for Business customers:
100,000 requests per 24 hour period.
10 requests per second.
This app needs to have no restrictions on how many times it can get the location based on zip code.
Does Worklight have a simpler or better way of getting the zip Code for user's location(I've checked the worklight api reference calls but didn't see anything about retrieving user's zip code)?

Worklight provide a way to implement this by using adapters, but not the API itself. Although you could the adapter to work as something like a local cache of the ZIP you already know.
To save money due to the APIs that would be usually based on a number of calls, we would need to have some cache, database(more likely: CouchDB or mongoDB) to handle this cache of what you already know.
A mobile(app-side) solution + a server side solution. On putting this 2 together, worklight would help you.

Related

Allowed to use multiple YouTube API keys for 1 project?

I am quickly reaching quota limits while using YouTube Data API v3 for searches only using 1 API key.
I have applied for Quota increase but I hear it can take some time.
However I landed on the below article which states that a max of 300 APIs can be used for 1 project. Are my really allowed to use multiple YouTube Data API v3 keys and switch between them each time quota limit is reached??
https://cloud.google.com/docs/authentication/api-keys
I had been scrambling for solutions. I hope I read it well!
Keys and credentials within a project share their quota. Creating additional api keys within the same project on google developer console is not going to get you additional quota.
As seen below all the credentials her will share the same quota.
You would need to create additional projects and create a key within each project.
All of these projects have their own credentials with their own quotas.
You should wait for an extension These days it shouldn't take more then a couple of weeks to hear back about a quota increase.
The answer is yes and no (but probably more no than yes in your case).
YES, you are allowed to use multiple Youtube Data API v3 keys and switch between but NO, you can't switch between them because you reached the quota limitation.
By doing so, you violate Youtube's Developer Policies compliance and expose yourself to sanctions. The only reason you should switch between them is to separate your environments.
From the Youtube's Developer Policies :
Don’t create multiple Google Cloud projects for the same API service or use case in an attempt to deceptively acquire an API quota that is higher than the one your project was assigned.
It is acceptable to have a separate API Project for each different use case of your API service. Examples include:
One API project for your iOS app, a separate API Project for your Android app.
One API project for a production server, one for a development server.
One API project for your user-facing API service, one API project for internal system analytics
source : https://developers.google.com/youtube/terms/developer-policies-guide#don%E2%80%99t_spread_api_access_across_multiple_or_unknown_projects

Google Analytics APIs: get two specific numbers only (as simple as possible)

I want to get two statistics (Visits today, visits total) from my GoogleAnalytics account.
I checked Google Analytics resources such as
https://developers.google.com/analytics/devguides/reporting/?hl=en
https://developers.google.com/analytics/devguides/reporting/core/v3/reference
But it seems pretty time-consuming to get a certain ID, oAuth and everything working.
I do not need any user authentication, just an API request from my backend (GA authentication should be provided via request url for example).
To be honest, I found myself jumping from one link to another when doing tutorial and did not accomplish anything at the end.
What is the quickest way to get everything working? If there is a nice tutorial on getting JUST basic (two numbers) stuff from GoogleAnalytics I would be very grateful (everything I see is working almost as GA itself - just with custom styles/graphs etc. I need plain and simple number returned via REST api for instance.)
Thanks for any info!
Auth is understandably complicated, but it sounds like you need service account authentication since you are querying your own data and need it to run on the back end.
The quickest way to get from zero to querying the API is to follow the Hello Analytics Guide. I have linked you to the PHP service account page. But there are examples of service accounts, web apps, and installed apps in four different languages.
But an outline of the main steps are
Create a project in the Google developer console
Within that project create a service account and download the p12 file.
add that service account email to the particular view you wish to query.
You are now ready to modify the Hello Analytics example.
Below is a simple query for the number sessions today:
function getResults(&$analytics) {
return $analytics->data_ga->get(
'ga:XXXX', // Replace with your view ID.
'today',
'today',
'ga:sessions');
}
Feel free to ask any clarifying questions in the comments section.

Skydrive sync REST API

I have read the docs for SkyDrive REST APIs but didn't find any API using which i can sync with the SkyDrive, without recursive polling the folders for update check.
Is there any API to get only the update for a user Drive?
A commonplace reality of epistemology is that...
It is typically much easier to prove that something exists than to prove that it does not exist
Never the less I can say with a high level of confidence that the official REST API for Skydrive doesn't include a way of getting a list of updated documents for synchronization purposes.
Furthermore I didn't see any evidence of a non-supported/non-official API that would serve this purpose and by observing the way the Windows Client for SkyDrive interacts with the server (within limit of fair-use reverse engineering), it appears that the synchronization is done by reviewing the directory tree rather than getting a differential list.
I believe the closes you can go is: Get a list of the user's most recently used documents
To get a list of SkyDrive documents that the user has most recently
used, use the wl.skydrive scope to make a GET request to
/USER_ID/skydrive/recent_docs, where USER_ID is either me or the user
ID of the consenting user. Here's an example.
GET http://apis.live.net/v5.0/me/skydrive/recent_docs?access_token=ACCESS_TOKEN

Google Search API for desktop application. Which API to use to make maximum requests per day?

I'm building an application that should query Google search very often. But i'm having trouble choosing which API i should use. There are so many of them - AJAX, REST, Web, SOAP, Custom and maybe something else. Some of them are deprecated now. From that list, from what i understand, only AJAX and Custom Search API are not. Custom Search API has 100 requests per day limit. Very small amount. I couldn't find any published limits for AJAX API, but it looks like i can do only 20 requests per hour or so. Also not so good.
So, which API should i use in desktop application to get as much as possible? And second question: what else i can do to increase the limit? Maybe set appropriate http headers, use API key or something else?

Google API Request Limit

Does anyone know where I can find Google API Request Limits for their different services?
On simulating 500+ concurrent users it seems to fail silently fairly often (maybe 1 in 10 loads)
Any ideas?
The information is in their support resources. I am not aware of a central place, but it's all there. Searching the docs for "request limit" should usually do the trick.
The Geocoding API's limits for example can be found here.
Google Maps API Web Services and Google Static Maps API limits were cut effective a few days ago. Starting October 1st 2011 commercial web sites and apps using Google Maps API for free receive:
max of 2,500 calls/day, if modified using Styled Maps feature
max of 25,000 calls/day in total
Fusion tables are preferable to the Google Maps API alone, particularly with respect to rate limits:
Applications using the Google Fusion Tables API can send a maximum of
5 requests per second to the Google Fusion Tables server.
I think they removed the limit recently: can't even find a mention of it in documentation pages where I know for sure that it was mentioned and read about the limit removal somewhere this summer.
Even their new EULA states that their service is not limited but they remain free to limit it however they want at any moment.
500 concurrent users doesn't seem to be that much though, even if limitations where in place; are you sure it's Google what's failing?