Filter the suggestion in Autocomplete - here-api

I'm using https://places.cit.api.here.com/places/v1/autosuggest and I would like to know how can you filter the response for just having category: administrative-region in the suggestions ?
Thank you !

Currently filter by category is possible in Explore resource of places API not in Autocomplete API where you can specify the category Id to filter the result as below-
https://places.cit.api.here.com/places/v1/discover/explore?at=40.74917,-73.98529&cat=900-9200-0218&cs=pds&Accept-Language=en-US%2Cen%3Bq%3D0.5&app_id=xxx&app_code=yyy
By setting the parameter cat=900-9200-0218&cs=pds
also not all the category can be applied in the filter as they are RESTRICTED.
https://developer.here.com/documentation/places/dev_guide/topics/place_categories/category-900-areas-buildings.html

Related

How to autocomplete only city(city-town-village)

Request 'https://places.cit.api.here.com/places/v1/autosuggest?app_code=[app_code]&app_id=[app_id]&at=0,0&q=budapesht' return the list of different places, but I need only places with category city-town-village. How to filter only cities?
If you use this query
https://places.cit.api.here.com/places/v1/autosuggest?at=47.4799441%2C18.9826451&q=town&result_types=category&app_id=[app_id]&app_code=[app_code]
you will only get back results of type "category" that start with "town". That's not what is being asked for.
You can set "result_types=address" so that you don't get back chain, category, or place results, but currently there's no way of filtering such that you only get city-town-village. You will also get administrative areas, streets, etc.
Please try use parameter result_types=category and q="townhalls" or "government-community-facility" in autocomplete suggestions API.
And the category "city-town-village" seems no longer valid.
https://places.cit.api.here.com/places/v1/autosuggest?at=47.4799441%2C18.9826451&q=town&result_types=category&app_id=[app_id]&app_code=[app_code]

how to change value of select list on change of another select list in exposed filter

I have created two exposed filter with the same field District.
When I change the selected value of District field 1, value of list one is set to District field 2.
what should I do for achieving this for more clarification of the question I have image attached bellow.
Please see the image:
Did you try this Drupal module
https://www.drupal.org/project/views_dependent_filters
Try this module :
https://www.drupal.org/project/views_conditional
Also this post can helps : https://drupal.stackexchange.com/questions/174334/views-conditional-filter

What is a valid format for params in news bing url?

I'm trying to add some filters to request for news in bing api but currently I don't get any effects of doing this ( for example filter for news from current month).
I'm trying to this with : https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&?category=business , and replacing some filters here but I always getting the same result.
Currently i want to add three filters : freshness, category and language for news from current day and month.
So it is bug or I'm doing something wrong with filters ?
One problem is that you have an extra "?" in your query. You only need the first one, and then you can use "&" to delimit individual parameters:
https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&category=business
You might also try adding a market to the query string, like so:
https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&category=business&mkt=en-us
I'm using 7.0 and don't know what headers you're passing, so I can't test this directly, but it's possible a default market isn't being set. Since categories are market specific, then depending on how Bing handles this, it could plausibly prevent your category from being used.

How to get results in Views (Contextual Filters) regarded titles in URL in Drupal 7

I want Views to give me results by criteria of title of the node. I want to display all results from the nodes with the same title. So I used Pathauto module, and put what is in title fields into url. But when I tried to set contextual filters it doesn't return any results. I tried many options for example :
Type - Raw value from URL,
Path component: 1,
and did some variation with that, but nothing. What I have to do.
Thanks in advance!
Don't use contextual filter, try this way:
Go to Advanced tab and turn "Use aggregation : Yes"
Add a filter Content: Title
Set Aggregation Type : Count
After that set Operator: Is greater than ; Value : 1

Is there any module which list the related nodes based on the title , So that the user can set multiple related node

Is there any module which list the related nodes based on the title , So that the user can set multiple related node.
i want to display related songs based on title without using taxonomy.
like http://www.djcity.com/digital/robin-thicke-give-it-2-u-viol8tor-trap-remix---32213.htm
any body help me...
I think its the best module: https://drupal.org/project/featured_content
But if you want more alternatives, visit this url: https://groups.drupal.org/node/12347
I hope the information has been useful.
Regards.

Resources