buildURL (modelName, id, snapshot, requestType, query) String
Builds a URL for a given type and optional ID.
By default, it pluralizes the type's name (for example, 'post' becomes 'posts' and 'person' becomes 'people'). To override the pluralization see pathForType.
If an ID is specified, it adds the ID to the path generated for the type, separated by a /
.
When called by RESTAdapter.findMany() the id
and snapshot
parameters will be arrays of ids and snapshots.
Parameters:
-
modelName
String
-
id
(String|Array|Object)
- single id or array of ids or query
-
snapshot
(DS.Snapshot|Array)
- single snapshot or array of snapshots
-
requestType
String
-
query
Object
- object of query parameters to send for query requests.
Returns:
-
String
- url
Please login to continue.