Skip to content

DataAPI SDK english MT.DataAPI Core method bindEndpointParams

Taku AMANO edited this page Jul 5, 2013 · 1 revision

bindEndpointParams

Bind parameters to route spec.

Parameters

Name Type Required Description
route String yes Specification of route
params Object yes parameters
params.{key} Number | Object | Function yes Value to bind

Returns

String: Endpoint to witch parameters was bound

Example

var route = "/sites/:site_id/entries/:entry_id/comments/:comment_id";
api.bindEndpointParams(route, {
  blog_id: 1,
  entry_id: {id: 1},
  comment_id: functioin(){ return 1; }
});
Clone this wiki locally