Data Models User Info - AmayaHena/AreaDocumentation GitHub Wiki

Data Models UserInfo

Data models is a page to explain the format of data received on/by the server.

On this page you can find data models of the following models:

UserInfo

Definition: Information related to a user.

WARNING: The field "Trigger" is optional.

Format:

{
    "Area": [{

        "name": "RVname",
        "service": "$RVservice",
        "lastCheckTime": "$RVlastCheckTime",
        "Trigger": {
           "TriggerType": "$RVtriggerType",
            // this part is dynamic & depdendant to each trigger
        },
        "Action": {
            "actionType": "$RVactionType",
            // this part is dynamic & depdendant to each action
        },
        "Reaction": {
            "actionType": "$RVreactionType",
            // this part is dynamic & depdendant to each reaction
        }

    }]
}

Description of right values:

RVName:
Definition: Name of the following Area
Value: string
WARNING: The name MUST be unique, and shouldn't already exist

RVservice:
Definition: Name of the chosen service
Value: string

RVlastCheckTime:
Definition: Last time the server checked for this area
Value: unix timestamp

RVtriggerType:
Definition: Trigger type to check
Value: string

RVactionType:
Definition: Action type to check
Value: string

RVreactionType:
Definition: Reaction type to trigger
Value: string

Example:

{
    "Area": [{

            "name": "MyFavSub",
            "service:": "Reddit",
            "lastCheckTime": 1611002192,
            "Trigger": {
                "TriggerType": "HourType",
                "begin": 9,
                "end": 22,
            },
            "Action": {
                "actionType": "NewRedditPost",
                "targetSubReddit": "r/GawrGura"
            },
            "Reaction": {
                "reactionType": "mail",
                "mailTarget":"[email protected]"
            }
        },
        {

            "name": "MyFavPost",
            "service:": "Reddit",
            "lastCheckTime": 1611002238,
            "Action": {
                "actionType": "NewRedditCom",
                "targetRedditPost": "https://www.reddit.com/r/GawrGura/comments/kfihdc/baby_shark/"
            },
            "Reaction": {
                "reactionType": "discord",
                "pmTarget": "Amaya#0139"
            }
        },
        {

            "name": "LiveGura",
            "service:": "Youtube",
            "lastCheckTime": 1611002252,
            "Action":{
                "actionType": "YoutubeLive",
                "targetYoutubeChannel": "Gawr Gura Ch. hololive-EN"
            },
            "Reaction":{
                "reactionType": "facebookMessenger",
                "pmTarget": "ImA Weeb"
            }
        }
    ]
}