class Lenel::OpenAccess::Client
- Lenel::OpenAccess::Client
- Reference
- Object
Overview
Lenel OpenAccess API wrapper.
Provides thin abstractions over API endpoints. Requests are executed on the
pased transport. This can be a PlaceOS::Driver
, HTTP::Client
or other type
supporting the same set of base HTTP request methods.
Defined in:
lenel/open_access/client.crConstructors
Instance Method Summary
- #app_id : String
- #app_id=(app_id : String)
-
#count(entity type_name : T.class, filter : String | Nil = nil) forall T
Counts the number of instances of entity.
-
#create(entity : T.class, **props) forall T
Creates a new instance of entity.
-
#delete(entity : T.class, **props) : Nil forall T
Deletes an instance of entity.
-
#directories
Enumerates the directories available for auth.
-
#get_logged_events(filter : String | Nil = nil, page_number : Int32 | Nil = nil, page_size : Int32 | Nil = 100, order_by : String | Nil = nil)
Retrieve a list of logged events from Onguard See Onguard 7.6 OpenAccess User Gude > Chapter 4 REST API > Manage Instances > get logged_events
-
#keepalive : Nil
Request a connection keepalive to prevent session timeout.
-
#login(username user_name : String, password : String, directory_id : String | Nil)
Creates a new auth session.
-
#logout : Nil
Removes an auth session.
-
#lookup(entity type_name : T.class, filter : String | Nil = nil, page_number : Int32 | Nil = nil, page_size : Int32 | Nil = nil, order_by : String | Nil = nil) : Array(T) forall T
Retrieves instances of a particular entity.
- #raw_lookup(type_name : String, filter : String | Nil = nil, page_number : Int32 | Nil = nil, page_size : Int32 | Nil = 100, order_by : String | Nil = nil)
- #token : String | Nil
- #token=(token : String | Nil)
-
#update(entity : T.class, **props) : T forall T
Updates a record of entity.
-
#version
Gets the version of the attached OnGuard system.
Constructor Detail
Instance Method Detail
Counts the number of instances of entity.
filter may optionally be used to specify a subset of these.
Creates a new instance of entity.
API create responses return a partial object, which is provided here as an untyped return. This includes the object's database key (which varies between object types - ID, BADGEKEY etc), however contents of this is unspecified. The partial object is provided here, in full, with keys transformed to match how they appear in a type-safe model.
Retrieve a list of logged events from Onguard See Onguard 7.6 OpenAccess User Gude > Chapter 4 REST API > Manage Instances > get logged_events
Creates a new auth session.
Retrieves instances of a particular entity.
The search criteria specified in filter is a subset of SQL. This supports operations such as as:
- exclusion
LastName != "Lake"
- wildcards
LastName like "La%"
- boolean operators
LastName = "Lake" OR FirstName = "Lisa"
Updates a record of entity. Passed properties must include the types key and any fields to update.