All records in UGC are described with a common Record object that has the following signature:
Record
- ID (int)
- RecordTypeName (string)
- CreatedOn (DateTime)
- CreatedBy (int)
- ModifiedOn (DateTime)
- ModifiedBy (int)
- State (RecordState)
- Reason (string)
- Flagged (bool)
- Spam (bool)
- Illegal (bool)
- AbuseCount (int)
- Values (Dictionary<string, object>)
- Key/value Dictionary of all of the user defined field values for the record.
- There is a default property for this collection on the record class itself, eg: record[“FieldName”]
- Accessing a field that does not exist on the record using the default property will return null, but this will throw a keyNotFound exception if this is done using the Values property. It is recommended to use the Values.TryKeyValue() method in this case.
- All custom field values, apart from the ‘file’ types, are typed as strings.
- Dates are in the format yyyy-mm-dd hh:mm:ss tt.
- All file type fields are of the FileServiceMetaData type, with the following properties:
- FileService
- Enum of the Agility.UGC.API.FileServiceType
- AmazonS3 = 0, YouTube = 1, Flickr = 2, Image = 3, Video = 4
- FileServiceState
- New= 0, Unprocessed = 1, Processed = 2, Error = 3
- OriginalFilePath
- The AmazonS3 path to where the file was originally uploaded to
- Custom File Service Values
- FileService
- All of the other values, accessible via record.FileField.FileServiceValue or record.FileField[“FileServiceFieldValue”]. These values are specific to each file service, and may or may not be available depending on the state of the object in the file service.
Comments
Please sign in to leave a comment.