Plugin to send and get data from neoCMS.
Based on Headless Cockpit CMS:
https://github.com/agentejo/cockpit

Version: 1.3

Sample Apps:

https://visualneo.com/tutorials/neocms1
https://visualneo.com/tutorials/neocms2
https://visualneo.com/tutorials/neocms3
https://visualneo.com/tutorials/neocms4

 

neoCmsSetUrl

Purpose:

Set neoCms installation URL

Category:

neoCms

Syntax:

neoCmsSetUrl "theName" "theUrl"

 

theName

Instance name (neoCms unique id)

theUrl

neoCms installation URL (ie: https://mywebsite.com/cms)

 

neoCmsSetToken

Purpose:

Set neoCms access Token (Use with caution)
Use instead of neoCmsLogin to set a Token

Category:

neoCms

Syntax:

neoCmsSetToken "theName" "theToken"

 

theName

Instance name (neoCms unique id)

theToken

Access token

 

neoCmsLogin

Purpose:

User login. Use it to get user information and API key (it will replace token).
Each user can have different access permissions to neoCms APIs.
Endpoint: /api/cockpit/authUser

Category:

neoCms

Syntax:

neoCmsLogin "theName" "theUser" "thePassword" varObj varError theSub

 

theName

Instance name (neoCms unique id)

theUser

User name

thePassword

Password

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsLogout

Purpose:

User logout. Set access token to an empty string.

Category:

neoCms

Syntax:

neoCmsLogout "theName"

 

theName

Instance name (neoCms unique id)

 

neoCmsGetCollection

Purpose:

Get the data from a neoCms Collection
Endpoint: /api/collections/collection

Category:

neoCms

Syntax:

neoCmsGetCollection "theName" "theCollectionName" varObj varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection name

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)


neoCmsGetCollectionNumItems

Purpose:

Get the number of items in a neoCms Collection
Endpoint: /api/collections/collection

Category:

neoCms

Syntax:

neoCmsGetCollectionNumItems "theName" "theCollectionName" varName varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection name

varName

Variable to store the number of items

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)


neoCmsGetOrderedCollection

Purpose:

Get the data from a neoCms Collection in order
Endpoint: /api/collections/collection

Category:

neoCms

Syntax:

neoCmsGetOrderedCollection "theName" "theCollectionName" "theFields" theLimit theSkip orderBy theOrder varObj varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection name

theFields

Comma separated fields to retrieve (empty to get them all)

theLimit

Limit number of results to (0 for no limit)

theSkip

Items to skip

orderBy

Order by (field name or select metadata)

theOrder

Order direction

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsSearchCollection

Purpose:

Get filtered data from a neoCms Collection
For RegExp search method use a valid PHP regular expression without slashes.
Endpoint: /api/collections/get

Category:

neoCms

Syntax:

neoCmsSearchCollection "theName" "theCollectionName" "theFields" "theField" theValue "theMethod theLimit theSkip orderBy theOrder varObj varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection's name

theFields

Comma separated fields to retrieve (empty to get them all)

theField

Field name to search into

theValue

Value to search for

"theMethod

Search method"

theLimit

Limit number of results to (0 for no limit)

theSkip

Items to skip

orderBy

Order by (field name or select metadata)

theOrder

Order direction

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsAddFilter

Purpose:

Add a search filter to a filter object. You can add many filters to the same object name. Use before neoCmsAdvancedSearchCollection

Category:

neoCms

Syntax:

neoCmsAddFilter "filterName" "theField" theValue "theMethod

 

filterName

Filter object name

theField

Field name to search into

theValue

Value to search for

"theMethod

Search method"

 

neoCmsAddOrderField

Purpose:

Add an order field an order object. You can add many order fields to the same object name. Use before neoCmsAdvancedSearchCollection

Category:

neoCms

Syntax:

neoCmsAddOrderField "orderName" orderBy theOrder

 

orderName

Order object name

orderBy

Order by (field name or select metadata)

theOrder

Order direction

 

neoCmsAdvancedSearchCollection

Purpose:

Get advanced filtered data from a neoCms Collection
Endpoint: /api/collections/get

Category:

neoCms

Syntax:

neoCmsAdvancedSearchCollection "theName" "theCollectionName" "theFields" theFilter theLimit theSkip orderName varObj varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection's name

theFields

Comma separated fields to retrieve (empty to get them all)

theFilter

Filter object (use neoCmsAddFilter first)

theLimit

Limit number of results to (0 for no limit)

theSkip

Items to skip

orderName

Order object (use neoCmsAddOrderField first)

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsGetCollectionsNames

Purpose:

Get a list with all the neoCms Collections names.
Endpoint: /api/collections/listCollections

Category:

neoCms

Syntax:

neoCmsGetCollectionsNames "theName" varObj varError theSub

 

theName

Instance name (neoCms unique id)

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsGetCollectionSchema

Purpose:

Get a neoCms Collection schema.
Endpoint: /api/collections/collection

Category:

neoCms

Syntax:

neoCmsGetCollectionSchema "theName" "theCollectionName" varObj varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection's name

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsAddCollectionItem

Purpose:

Add new item to a neoCms Collection.
Endpoint: /api/collections/save

Category:

neoCms

Syntax:

neoCmsAddCollectionItem "theName" "theCollectionName" theObject varObj varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection name

theObject

Variable object with item data

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsUpdateCollectionItem

Purpose:

Update an existing neoCms Collection item.
Endpoint: /api/collections/save

Category:

neoCms

Syntax:

neoCmsUpdateCollectionItem "theName" "theCollectionName" theObject "theId" varObj varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection name

theObject

Variable object with item data

theId

Item _id

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsRemoveCollectionItems

Purpose:

Delete existing neoCms Collection items that match search criteria.
Endpoint: /api/collections/remove

Category:

neoCms

Syntax:

neoCmsRemoveCollectionItems "theName" "theCollectionName" "theField" theValue "theMethod varObj varError theSub

 

theName

Instance name (neoCms unique id)

theCollectionName

Collection name

theField

Field name to search into

theValue

Value to search for

"theMethod

Search method"

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsSaveToForm

Purpose:

Save any variable object into a neoCms Form.
Endpoint: /api/forms/submit

Category:

neoCms

Syntax:

neoCmsSaveToForm "theName" "theFormName" theObject varObj varError theSub

 

theName

Instance name (neoCms unique id)

theFormName

Form name

theObject

Variable object to save

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsGetForm

Purpose:

Get the data from a neoCms Form
Endpoint: /api/forms/export/

Category:

neoCms

Syntax:

neoCmsGetForm "theName" "theFormName" varObj varError theSub

 

theName

Instance name (neoCms unique id)

theFormName

Form name

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

neoCmsGetSingleton

Purpose:

Get the data from a neoCms Singleton
Endpoint: /api/singletons/get

Category:

neoCms

Syntax:

neoCmsGetSingleton "theName" "theSingletonName" varObj varError theSub

 

theName

Instance name (neoCms unique id)

theSingletonName

Singleton name

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsGetSingletonsNames

Purpose:

Get a list with all the neoCms Singleton names.
Endpoint: /api/singletons/listSingletons

Category:

neoCms

Syntax:

neoCmsGetSingletonsNames "theName" varObj varError theSub

 

theName

Instance name (neoCms unique id)

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsGetAssets

Purpose:

Get assets information (files)
Endpoint: /api/cockpit/assets

Category:

neoCms

Syntax:

neoCmsGetAssets "theName" theField theValue "theMethod theLimit varObj varError theSub

 

theName

Instance name (neoCms unique id)

theField

Field name to search into

theValue

Value to search for

"theMethod

Search method"

theLimit

Limit results to (0 for no limit)

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsAddUser

Purpose:

Add new user to neoCms user group.
By sure to add and configure Group permissions first.
Endpoint: /api/cockpit/saveUser

Category:

neoCms

Syntax:

neoCmsAddUser "theName" "userName" "thePassword" "realName" "theEmail" "theGroup" theLanguage isActive varObj varError theSub

 

theName

Instance name (neoCms unique id)

userName

User nick name. No spaces nor special characters.

thePassword

User password

realName

User name

theEmail

User email

theGroup

Group (previously defined within neoCms)

theLanguage

User language

isActive

Set as active?

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsUpdateUser

Purpose:

Update user information in neoCms.
Left empty any field you don't want to update.
Endpoint: /api/cockpit/saveUser

Category:

neoCms

Syntax:

neoCmsUpdateUser "theName" "userId" "userName" "thePassword" "realName" "theEmail" "theGroup" "theLanguage" isActive varObj varError theSub

 

theName

Instance name (neoCms unique id)

userId

User _id (mandatory)

userName

User nick name. No spaces nor special characters.

thePassword

User password

realName

User name

theEmail

User email

theGroup

Group (previously defined within neoCms)

theLanguage

Language (ie: 'en' for english, 'es' for spanish...)

isActive

Set as active?

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsGetUsers

Purpose:

Get data from registered users
Endpoint: /api/cockpit/listUsers

Category:

neoCms

Syntax:

neoCmsGetUsers "theName" varObj varError theSub

 

theName

Instance name (neoCms unique id)

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsGetLocalizedStrings

Purpose:

Get localized strings of a project
Endpoint: /api/lokalize/project/

Category:

neoCms

Syntax:

neoCmsGetLocalizedStrings "theName" "theProject" "language" varObj varError theSub

 

theName

Instance name (neoCms unique id)

theProject

Project name

language

Language (ie: 'es', 'en', 'fr'... or 'All' to get them all.

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

neoCmsCallApi

Purpose:

Call a neoCms API endpoint directly (Advanced)

Category:

neoCms

Syntax:

neoCmsCallApi "theName" "theApi" [theObject] varObj varError theSub

 

theName

Instance name (neoCms unique id)

theApi

API endpoint

theObject

Object variable to send

varObj

Object variable to store results

varError

Variable to store error message (if any)

theSub

Callback subroutine (optional)

 

Created with the Personal Edition of HelpNDoc: Full-featured Kindle eBooks generator