javascript - API Cluster - Using Custom Group Config for Default Endpoint -
i'm using api cluster library. when try create multiple endpoint group
sometime might want use default endpoint
pattern config options can different.
scenario: if don't mention 'endpoint' in group value should taken default 'endpoint' pattern
please have @ code click here
this 1 of limitation in api cluster 1.0.5
js library.
because api cluster 1.0.5
expect addanother
/ defaults
method parameter requires below 3 options mandatory.
- name
- config
- endpoints
defaults / addanother method creates endpoint groups, each group independent
try below problem.
apicluster .defaults({ name: 'mydefault', config: { 'employee': 'emp', 'details': 'defaultdetails', 'timesheet': 'timesheet' }, endpoints: { "empdetails": "_employee_/_details_/:empid/profile" } }) .addanother({ name: 'v1', config: { 'employee': 'emp', 'details': 'v1details', 'timesheet': 'timesheet' }, endpoints: { "empdetails": "_employee_/_details_/:empid/profile" } }); var empdetailurl = apicluster .use('v1') .get('empdetails') .arg({ 'empid': 1000 }) .query({ 'confirm': 'yes', 'testaccount': 'yes' }) .url();
Comments
Post a Comment