Skip to main content

ocl@1.1.9

Functions

get(path, query, callback)
getMappings(ownerId, repositoryId, [options], callback)

The following functions are exported from the common adaptor:

alterState()
dataPath()
dataValue()
each()
field()
fields()
fn()
lastReferenceValue()
merge()
sourceValue()

get

get(path, query, callback) ⇒ Operation

Get a resource in OCL

ParamTypeDescription
pathstringPath to resource
queryobjectA query object that will limit what resources are retrieved when converted into request params.
callbackfunction(Optional) callback function

Example

get(
"orgs/MSFOCG/collections/lime-demo/HEAD/mappings",
{
page: 1,
exact_match: "off",
limit: 200,
verbose: false,
sortDesc: "_score",
},
(state) => {
// Add state oclMappings
const oclMappings = state.data;
return { ...state, data: {}, references: [], response: {}, oclMappings };
}
);

getMappings

getMappings(ownerId, repositoryId, [options], callback) ⇒ Operation

Get a source repository in OCL

ParamTypeDescription
ownerIdstringAn OCL user or organization
repositoryIdstringAn OCL collection id or source id
[options]ObjectOptional. options which can be passed to See more on OCL swagger docs
callbackfunction(Optional) callback function

Example

getMappings(
"MSFOCG",
"lime-demo",
{ page: 1, exact_match: "off", verbose: false },
(state) => {
// Add state oclMappings
const oclMappings = state.data;
return { ...state, data: {}, references: [], response: {}, oclMappings };
}
);