ocl@1.2.8
This adaptor exports the following from common:
- alterState()
- dataPath()
- dataValue()
- each()
- field()
- fields()
- fn()
- fnIf()
- lastReferenceValue()
- merge()
- sourceValue()
Functions
get
get(path, query, callback) ⇒ Operation
Get a resource in OCL
Param | Type | Description |
---|---|---|
path | string | Path to resource |
query | object | A query object that will limit what resources are retrieved when converted into request params. |
callback | function | (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
Param | Type | Description |
---|---|---|
ownerId | string | An OCL user or organization |
repositoryId | string | An OCL collection id or source id |
[options] | Object | Optional. options which can be passed to See more on OCL swagger docs |
callback | function | (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 };
}
);