Engine  12.0.1
Factual's Engine SDK
Instance Methods | Properties | List of all members
FactualCircumstance Class Reference

#import <CommonApiObjects.h>

Inheritance diagram for FactualCircumstance:

Instance Methods

(nonnull instancetype) - initWithId:expr:tags:
 
(nonnull instancetype) - initWithId:expr:tags:name:
 
(nonnull NSDictionary *) - toDict
 

Properties

NSString * circumstanceId
 
NSString * expr
 
NSArray< NSString * > * tags
 
NSString * name
 

Detailed Description

A user defined circumstance. For more on Circumstances, see Factual's developer docs.

Method Documentation

◆ initWithId:expr:tags:()

- (nonnull instancetype) initWithId: (nonnull NSString *)  id
expr: (nonnull NSString *)  expr
tags: (nonnull NSArray< NSString * > *)  tags 

Constructs a FactualCircumstance object.

Name field is set to default value of "NOT_PROVIDED_BY_USER".

Parameters
idThe id of the circumstance.
exprThe circumstance expression.
tagsThe tags associated with the circumstance. Tags must be non-empty strings containing only alphanumeric characters, dashes, and underscores.
Returns
A FacutalCircumstance object.

◆ initWithId:expr:tags:name:()

- (nonnull instancetype) initWithId: (nonnull NSString *)  id
expr: (nonnull NSString *)  expr
tags: (nonnull NSArray< NSString * > *)  tags
name: (nonnull NSString *)  name 

Constructs a FactualCircumstance object.

Parameters
idThe id of the circumstance.
exprThe circumstance expression.
tagsThe tags associated with the circumstance
nameThe recognizable name of the circumstance
Returns
A FacutalCircumstance object.

◆ toDict()

- (nonnull NSDictionary *) toDict

Returns the FactualCircumstance as a NSDictionary.

Returns
The FactualCircumstance as a NSDictionary.

Property Documentation

◆ circumstanceId

- (NSString*) circumstanceId
readatomicassign

The id of the circumstance.

◆ expr

- (NSString*) expr
readatomicassign

The circumstance expression.

◆ name

- (NSString*) name
readatomicassign

A recognizable name for the circumstance. If a name is not provided during initalization a default vaue of "NOT_PROVIDED_BY_USER" will be used.

◆ tags

- (NSArray<NSString *>*) tags
readatomicassign

The tags associated with the circumstance. Tags must be non-empty strings containing only alphanumeric characters, dashes, and underscores.


The documentation for this class was generated from the following file: