I'm new using this API. I want to request for a route using "Here API". The route xml/json is what I get easyly (I have the Maneuver values with calculateroute method), but I want to show users the map with the route. I have been able to show it using http://image.maps.cit.api.here.com/mia/1.6/route?, but this method only supports GET requests, and many times I have to make requests larger than 2500 characters supported by GET. Is there any other method to get an image with the route from Madrid to Berlin, for example?
Any reason why you could not use the JS-Maps API as well for showing the route, then you could simply use the waypoints as arguments. You can find example at: https://developer.here.com/javascript-apis/documentation/maps/topics/routing.html
Related
http://localhost:4200/product-list?gender=2&category=4
http://localhost:4200/product-list?gender=2
http://localhost:4200/product-list?category=4
i want to use one backend controller for the endpoints.
can i do that? i tried but with no success. (using angular)
What exactly did you try with angular? The backend controller? Angular is a frontend framework.
However, you could indeed have one single controller (e.g. ProductController) for your endpoints. I would suggest implementing a "getProducts" method that can be filterable. That way you can use single endpoint and provide optional filter options as needed.
I may not understand your question entirely, so please stat otherwise. But, Yes. You have one endpoint stated above, with different query params. Depending on the different query params (their value or even if they are present), your singular endpoint can do something different.
So your endpoint is
http://localhost:4200/product-list
This endpoint (which there is only one), can have as many query params as you like. As per the response above, Angular does not handle this, this would be some backend functionality for your end point, to read the request, and based on what query params are 'found' then trigger a different response.
I recently began working with JavaScript and am looking at various get and post requests one can send to a server.
For get, as far as I know, all of the information of the query is contained in the URL that the user triggers. On the server side this has to be dissected to retrieve the necessary parameters.
I was just wondering how larger and more detailed requests are handled with this get method? For instance what if I had millions and millions of parameters that make up my whole request? Would they all be jumbled into the URL? Is there a limit as to the number of unique URLs one can have? I read this post:
How do URL shorteners guarantee unique URLs when they don't expire?
I would really like some more input.
Thank You!
Loopback has nice documentation which you can view at
http://<your-domain>:<your-port>/explorer
I want to write some tests for our server, and at the very least do a GET request for each of the endpoints that should be public and available over REST.
Loopback explorer clearly has this information somewhere - is there a way to get a list of endpoints programmatically?
I just want something like this list:
PATCH /ServicecontractViews
GET /ServicecontractViews
PUT /ServicecontractViews
POST /ServicecontractViews
PATCH /ServicecontractViews/{id}
GET /ServicecontractViews/{id}
HEAD /ServicecontractViews/{id}
GET /Notes/{id}
HEAD /Notes/{id}
PUT /Notes/{id}
DELETE /Notes/{id}
GET /Notes/{id}/exists
is it possible to get this information programmatically (while the server is live)?
The LoopBack explorer uses Swagger JSON to generate the UI you see.
If you watch the XHR requests using your browser debugger, you can grab the direct URL to the raw Swagger. This data should contain what you need, though not in quite as concise a format as you probably want.
my app has a controller that outputs the total social count for various pages: http://pastebin.com/MLBTb3mi
..it works fine when i'm making a few calls at a time but say when there is a website of 1000 urls and i want to update the social count for each of the urls, it breaks when its hit with volume calls asynchronously - particularly g+ and fb break. Here's the console error I get as the response to the call made to fb's graph id (this is the 'body' response - please refer to line 74 of the controller: http://pastebin.com/MLBTb3mi
facebook body is {"id":"970371719648388","created_time":"2015-04-02T07:43:09+0000","is_scrap
ed":false,"type":"website","updated_time":"2015-04-02T07:43:09+0000","url":"http:\/\/www.zappos.com\/womens-clothing\/"}
facebook result is undefined
Does anyone know how to solve this issue and to make the controller work smoothly?
I tried making bulk calls using sharedcount.com and i'm able to do 10s of thousand of simultaneous calls without any problem. How can I write my controller to handle such bulk operations without using external services like sharedcount?
You should examine the status code of the response. My guess is that you're getting rate-limited. See the Facebook page on rate-limiting for details; it doesn't discuss specific numbers on what will get you blocked, but it provides details on what to look for to indicate that you're being throttled. The solution is to throttle requests on your end so that they don't go out too fast; you can use something as simple as Lodash's _.throttle for this.
I am working on an iPhone app which allows users to search Foursquare. I am using the venues/explore endpoint for the search which works great, but the results don't include the images for a place or the priceTier.
Right now I am calling /venues/VENUE_ID for each of the returned results, which is generating a lot of API calls. Is there a better way to get this info in a single call?
Related question: If I use the multi endpoint to batch these requests, does that count as a single request towards the limit or as multiple requests?
Sounds like you're worried about limits more than network latency? If you're worried that making the extra call to details will make you hit rate limits faster, this is actually why we generally ask developers to cache details such as prices or photos :) A single multi request is not a single API call; it counts as how many requests are bundled into one.
There is a little help with photos though—if you pass in the venuePhotos=1 param as part of an explore request, you ought to get back photos in the response.