Google Places API: Using Multiple Name Parameters in the Places Search - api

I've been reading the documentation at: http://code.google.com/intl/nl/apis/maps/documentation/places/#PlaceSearches
But How do I modify the Place Search Request (shown below) so that I can limit the results to specific businesses only.
https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AIzaSyAiFpFd85eMtfbvmVNEYuNds5TEF9FjIPI
For example in the above code it hastypes=food&name=harbour as two of the parameters. How can I include just "bakery" and "cafe" (both are supported list types) as the types parameter and then include multiple name parameters as well.
In bigger cities it may come back with 20 or so results, but I want to limit it to a handful of businesses that I have agreements with and just show their names on the map. I don't want Starbucks to come back so I want to restrict it to just the 8-10 businesses that I have the agreements with. Their names will be stored in a database so I can easily retrieve them and pass them into the HTTP URL, but I don't know how to do multiple names and get them all to show up on the map at the same time.
Any links to tutorials that can help or your ideas and suggestions would greatly help!

You can include types "bakery" and "cafe" by modifying your request parameter types=food|bakery|cafe add more types separate by "|" operator
for supported type list refer Link

Related

Excluding locations from eBay Finding API

Using the finditemsadvanced service as part of eBays finding API, the documentation mentions filtering results to only include specific countries. However I'd like to exclude a small list of specific countries instead. Is there an option anywhere to exclude instead of include individual countries when querying for product listings?
No,
only Exclude options are ExcludeSeller and ExcludeCategory
or you have to list all the Countries you want in ListedIn or LocatedIn
perhaps MaxDistance option can be suitable for your needs..

How to re-rank documents based on their attributes rather than just their field relevance?

I'm trying to use Solr to re-rank document results based relevance to the user searching. For example, if I search joann*this could return documents where the Name field is anything from joanna to joanne. What I'm trying to do is to return documents that match on certain attributes that I have as well-- this could be something like us both having the field Location = "NYC".
So my question is two fold- is there a way to grab and handle a users information when they are making a query and also is there a way to re-rank based on these additional field values? Would this look more like writing some code or just an expanded query?
it looks to me like you are talking about functionality that Query Reranking exactly provides. Did you check that out?

Entity joining in xml

I have run into a little roadblock in regards to joining mantle entities. I would like to have a single depicting fields from two mantle entities, but am unsuccessful in joining them. Specifically, I have linked a list of party relationships (as contacts) to a single partyId (vendor), with the goal to make a vendor contacts page. However I am unable to link that form-list with the PartyContactMech and ContactMech entities (in order to display email and phone number in the same form-list). More generally, my question is how can one map lists to each other the same way one can map a list to a single object (using entity-find-one and value-field does not work when tried with entity-find)?
There is no need to make a view-entity (join entities) to do that. Simply do a query on the PartyRelationship entity in the main 'actions' part of your screen specifying the toParty (vendor). Then in your Form-List, use 'row-actions' to query the PartyContactMech and so on for each fromPartyId (contact) entry that the previous query returned. Also have a look at the PartyViewEntities file in Mantle USL. There are some helpful view-enties already defined for you there such as PartyToAndRelationship, PartyFromAndRelationship etc. Also note that entity-find-one returns a single "map" (value-field) as it queries on the PK. Whereas entity-find returns a list of maps (list). They are separate query types. If I understand your question correctly.

How to design RESTful URL with many input parameters

I am working to create a Java based RESTful API that uses Spring MVC.
Now for some of the API endpoints-- multiple different parameters are required... I am not talking about a list of values-- more like parameter1, parameter2, parameter3, parameter4 and so on-- where all the 4 (or more) parameters are of different data types as well.
How do I design the API endpoint URL for the above scenario, eg for 4 separate input parameters? Is there any recommended way/best practice for doing this? Or do I simply concatenate the 4 values, with ach pair of values separated by a delimiter like "/"?
EDIT from user comment:
Example: I have to retrieve a custom object(a 'file') based on 4 input parameters--(Integer) userid, (Integer) fileid, (String) type, and (String) usertype. Should I simply create a REST Endpoint like "getfile/{userid}/{fileid}/{type}/{usertype}-- or is there a better (or recommended way) to construct such REST endpoints?
In REST start by thinking about the resource and coming up with immutable permalinks (doesn't change)to identify that resource.
So, in your example (in comment), you said you want to retrieve a file resource for a user and type (file type or user type?)
So, start with just enough information to identify the resource. If the id is unique, then this is enough to identify the resource regardless of the user who owns the file:
/files/{fileId}
That's also important as the url if a file could change owners - remember we want to identify the resource with just the components needed so it can be a permalink.
You could also list the files for a specific user:
/users/{userId}/files/
The response would contain a list of files and each of those items in the list would contain links to the files (/files/{fileId})
If for some reason the file id is not unique but is unique only in the context of a user (files don't change owners and id increments within a user - wierd) then you would need these components to identify the resource:
/users/{userId}/files/{fileId}
Also note the order based on the description. In that wierd case, we said the files are logically contained and IDed by the user and that's also the containment in the url structure.
Hope that helps.
A GET request to file/{usertype}/{user}/{type}/{fileid} sounds good

How can I get more detailed information about asana tasks?

I saw an example of "QUERYING FOR TASKS", but it only returns the id and name of the tasks, I would like to get more information about tasks (for example created_at, completed, due_on, followers, etc) by querying them with API.
(I work for Asana)
See the section on input/output options in the docs: https://asana.com/developers/documentation/getting-started/input-output-options
By default, objects that are subobjects or that are returned from queries are output in "compact" form, which is usually just ID and name. If you want more detail for those objects, you can specify specific fields to include in the output using the opt_fields parameter. You can get all available fields on an object by "expanding" them with opt_expand. So if you are querying for tasks and want full records instead of compact ones, use opt_expand=.