How I can get place category or category id?
Here all categories and subcategories
http://support.google.com/places/bin/answer.py?hl=en&topic=1656882&answer=1722104#category
But places api doesn`t return cat_id
The Places API has a slightly different set of "types", which are returned in the API's Place Details response.
If you add a new place via the API should use these types, whereas bulk uploaded data should use the appropriate code in the help article you mentioned.
Related
I have created two content type builder which are category and sub-category respectively. While adding sub-category I had define one relationship which is one-to-many.
After creating successfully, I found that the basic CRUD API has been created and it works fine.
Now I need to find data like if I pass category-id then it has to return me it's all sub-category list.
Well, for this I can also write API manually, But I thought that strapi provides a feature of relationship though it may have some way to fetch data from the relationship table. In my app, I had set up a project with MySQL.
Expected output: Need a way to fetch data from a relation without writing custom API. Looking for inbuilt feature of strapi.
You have to use deep filtering.
📚Here is the documentation https://strapi.io/documentation/3.0.0-beta.x/guides/filters.html#deep-filtering
So you will be able to do /categories?sub-category.id=[your id]
I could able to get details about the restaurant using google place detail api, but I need to get Amenities particularly. The Api I use is mentioned below.
https://maps.googleapis.com/maps/api/place/details/json?placeid=PLACE_ID&key=API_KEY
You can't get amenities information from this API. They don't give you access to that information on purpose because Google Maps must have a competitive advantage. So, you can link the restaurant to that location on Google Maps in order give the option to view the amenities.
I know you can get it on the settings page.
I have multiple calendars on a single account.
I can get the names back with
service.list_calendar_lists(page_token: page_token)
but how do I can the calendar ids associated with the names of the calendars
The structure that's returned from service.list_calendar_lists is a JSON that has an entry items
items is an array of calendar list items, and each array element includes id which is what you're asking for.
So something like
array_of_ids = service.list_calendar_lists(page_token: page_token)['items']map{|i| i['id']}
You can use CalendarList() with a GET request as shown in the Google Calendar API here. I tested this by retrieving my own calendar id by passing in the "primary" keyword as described in the documentation linked above.
I am trying to fetch the 25 each videos under particular category, but i am struggle to form YouTube data API, can anyone help me to form.
I have got category list using categories API, but i am struggle to fetch videos of particular category.
You need to use the Videos List API
with the parameters chart=mostPopular and videoCategoryId=<id>
for example
https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular&videoCategoryId=10&key={YOUR_API_KEY}
This question regards the structure of applications when using laravel.
I have a view for making a sale/purchase from a company. This single view contains a client search, product list, service list and a staff list. Each of the items listed above has their own model. In the view, i would say search for a client which will call a function within the controller and populate a list. Same for the products and services etc etc.
What confuses me is that for the client search i would click a button that would fire to a url like /clients/search/search string, which would return the array of clients to display on the page. This function seems as if it would be appropriate within the client controller. I am unsure as to how i would be able to maintain the information from the client search and other parts of the sale to then submit it all together under one single controller (let's call it InvoiceController).
Can controllers share the functions from other controller? Do i simply store the information in a session variable? Do i simply put all relative functions to this sale under the InvoiceController?
Thanks for any help!
I would do a search for clients against the client controller, then when you select the client add this (client_id) to your invoice form. then save this with other invoice info via the invoice controller
After much deliberation, it appeared that AJAX was the simplest answer. In this case i used Angular JS and had that running a controller to fetch each segment of the Invoice, then use the main InvoiceController in Laravel to fire the final update.