I am accessing the google contacts api successfully with:
https://www.google.com/m8/feeds/contacts/default/full
And getting all my groups with:
https://www.google.com/m8/feeds/groups/default/full
However, the first query is pulling back every person I have ever emailed. I want it to only pull the mycontacts group. Apparantly this is a system group that can't be deleted by the user. How do I get just the contacts in this one group?
You need to specify v=3 in your query paramaters.
Google Contacts API v3 does not return system groups
Otherwise it interprets it as the v1 api which does not display system groups by default.
Related
As i am creating application like uber ola and using autocomplete api for address this one https://maps.googleapis.com/maps/api/place/autocomplete/json which is not return all location such as search Gwalior railway station but it does-not show right prediction.I want to search all address search like we do in google maps.Kindly help me which api should i use to achieve from any google rest api.Thanks in advance.
You need to use Places API of Google.
Here is an example for search
https://maps.googleapis.com/maps/api/place/textsearch/json?query=railway+station+in+gwalior&key=<YourKey>
The above API will provide you the paginated results in size of 20 and along with details of each. If you need further details you can use the following API along with the places ID which is returned from the above API response.
https://maps.googleapis.com/maps/api/place/details/json?placeid=<getThisFromResponseOfPreviousAPI>&fields=name,formatted_address,address_component,geometry&key=<YourKey>
Using ng2-adal for connecting to azure directory(https://github.com/mazhisai/ng2-adal-QuickStart). I have successfully logged in and received group id similar to this --> "groups":["4ba2649e-20d2-40f4-a406-2ed897686403","43e19f05-c077-4716-b001-0ffb0d75fff8"].
How can I get group name from the above token using ng2-adal(preferred since I've done everything using it)
I have successfully logged in and received group id similar to this --> "groups":["4ba2649e-20d2-40f4-a406-2ed897686403","43e19f05-c077-4716-b001-0ffb0d75fff8"].
For your angular application, you are using the implicit flow. AFAIK, the groups claim is under id_token, since you could see the groups claims, I assume that the number of groups which the current logged in user belongs no more than currently 6 or more groups. Details, you could follow Claims in id_tokens.
How can I get group name from the above token using ng2-adal(preferred since I've done everything using it)
The groups claim only lists limited number of groups a user belongs to. In order to acquire the group name, you need to explicitly call the related REST API (AD Graph > Get a group or Microsft Graph > Get group).
For retrieving the access_token, you need to call:
this.adalService.acquireToken(resource: string)
Note: For AD Graph API, you need to pass https://graph.windows.net, while for Microsoft Graph API, you need to pass https://graph.microsoft.com.
I would prefer use Microsoft Graph, the request would look as follows:
GET https://graph.microsoft.com/v1.0/groups/{id}?$select=displayName
Header: Authorization:Bearer {access_token}
Note: If the groups claim does not exist and there has a hasgroups claim, I assume that the group number of current logged in user belongs over the limitation, you may need to call the Graph API to retrieve the groups which the current logged in user belongs.
I'm trying to write a plugin for TFS 2015 (its important). I read a couple of manuals. the examples all turns out simply, but it is more difficult with a real plugin. my problem:
-How do I get all the teams that the user member is
i can get current team from web context:
var context = VSS.getWebContext();
var currTeam = context.team;
but how can i get all avaible teams and groups for current user(or by id)?
To get teams for current user
You could get the teams through this method getTeams() directly
IPromise<Contracts.WebApiTeam[]> getTeams(projectId, top, skip)
To get groups for current user
It's not able to do this through js or rest api for now. You could either use tfs command to list the info or use TFS API to achieve what you want. Related method in API: List application groups(), readidentities()
Detail code please refer this question: How to get TFS user groups and users in particular group using TFS API?
Another script solution you could also take a look, just in case you are interested: Using PowerShell and TFS API to list users
I have an application with leaflet and overpass.api. I use this overpass-layer plugin to query to OSM data.
My problem ist, when i query to0 often to overpass.api i get an Too Many request error after 2 queries.
overpass-api status shows me that there is a limitation. There is 1 available slot, and after a query it blocks my IP for a time period (30sec-3min).
Why is my IP banned already after 1 query?
I wanted to make an application to search with OSM tags and receive data from OSM database. My application works , but it is not possible to query often.
Is the starred group even a real group?
Can you access it with the group api?
This is the closest I have gotten:
http://www.google.com/m8/feeds/contacts/group/default?access_token=ya29.owFYVWvQ8nnKbxH4pdeB3gJ8-kME1cL0LcHCKQ3x7qhs7bbFfB2IdPVzOhqZNbtNkDQCu3f5by8ZRQ&group=http://www.google.com/m8/feeds/groups/jonathan.carl.odonnell%40gmail.com/base/6
The group is a real, non-system group whose ID changes from account to account. When I accessed the group using the google contacts API library I wrote, the name of the group was "Starred in Android", so you can find it in your list of groups that way.
Also see my response to the issue you opened on my repo.