Skip to content

Latest commit

 

History

History
282 lines (188 loc) · 8.3 KB

models.mdx

File metadata and controls

282 lines (188 loc) · 8.3 KB
title
Models
Usually either `teacher` or `student` _pattern: `/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/`_ _pattern: `/^[0-9a-f]{24}$/_`
<Expandable title="Subset of properties listed here">
    <ResponseField name="_id" type="string">
     **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="email" type="string" />
    <ResponseField name="name" type="string" />
    <ResponseField name="slug" type="string" />

    <ResponseField name="role" type="string">
    **roleString** Usually either ‘teacher’ or ‘student’
    </ResponseField>

    <ResponseField name="stats">

        <Expandable title= "Properties" >
            <ResponseField name="gamesCompleted" type="number" />
            <ResponseField name="concepts" type="number" />

            <ResponseField name="playTime" type="number" >
                Included only when specifically requested on the endpoint
            </ResponseField>

        </Expandable>

    </ResponseField>

    <ResponseField name="oAuthIdentities" >

        <Expandable title= "Properties" >
            <ResponseField name="provider" type="string" />
            <ResponseField name="id" type="string" />
        </Expandable>

    </ResponseField>

    <ResponseField name="subscription" >

        <Expandable title= "Properties" >
            <ResponseField name="ends" type="string" >
                **datetimeString** _pattern: `/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/`_
            </ResponseField>

            <ResponseField name="active" type="boolean" />
        </Expandable>

    </ResponseField>

    <ResponseField name="license" >

        <Expandable title= "Properties" >
            <ResponseField name="ends" type="string" >
            **datetimeString** _pattern: `/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/`_
            </ResponseField>

            <ResponseField name="active" type="boolean" />
        </Expandable>

    </ResponseField>

</Expandable>
<Expandable title="Subset of properties listed here">

    <ResponseField name="_id" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="name" type="string" />

    <ResponseField name="members" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/]`_
    </ResponseField>

    <ResponseField name="ownerID" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="description" type="string" />

    <ResponseField name="courses" >

    	**objectIdString** _pattern: `/^[0-9a-f]{24}$/`_

        <Expandable title="Properties">

            <ResponseField name="_id" type="string" />
            <ResponseField name="levels" type="string" />
            <ResponseField name="enrolled" type="string" />
            <ResponseField name="instance_id" type="string" />

        </Expandable>

    </ResponseField>

</Expandable>
<Expandable title="Subset of properties listed here">

    <ResponseField name="_id" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="name" type="string" />

    <ResponseField name="members" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/]`_
    </ResponseField>

    <ResponseField name="ownerID" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="description" type="string" />

    <ResponseField name="code" type="string" />
    <ResponseField name="codeCamel" type="string" />

    <ResponseField name="courses" >

    	**objectIdString** _pattern: `/^[0-9a-f]{24}$/`_

        <Expandable title="Properties">

            <ResponseField name="_id" type="string" />
            <ResponseField name="levels" type="string" />
            <ResponseField name="enrolled" type="string" />
            <ResponseField name="instance_id" type="string" />

        </Expandable>

    </ResponseField>

    <ResponseField name="clanId" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

</Expandable>
<Expandable title="Subset of properties listed here">

    <ResponseField name="playTime" type="number" >
        Total play time in seconds
    </ResponseField>

    <ResponseField name="gamesPlayed" type="number" >
        Number of levels played
    </ResponseField>

</Expandable>
<Expandable title="Subset of properties listed here">

    <ResponseField name="licenseDaysGranted" type="number" >
        Total number of license days granted
    </ResponseField>

    <ResponseField name="licenseDaysUsed" type="number" >
        Number of license days used
    </ResponseField>

    <ResponseField name="licenseDaysRemaining" type="number" >
        Number of license days remaining
    </ResponseField>

    <ResponseField name="activeLicenses" type="number" >
        Number of active/valid licenses
    </ResponseField>

</Expandable>
<Expandable title="Subset of properties listed here">

    <ResponseField name="state" type="boolean" >
        **complete**
    </ResponseField>

    <ResponseField name="level" type="string" >
        *original*** The id for the level.
    </ResponseField>

    <ResponseField name="levelID" type="string" >
        Level slug like wakka-maul
    </ResponseField>

    <ResponseField name="creator" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="playtime" type="integer" >
        Time played in seconds.
    </ResponseField>

    <ResponseField name="changed" type="string" >
        **datetimeString** _pattern: _`/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/`_
    </ResponseField>

    <ResponseField name="created" type="string" >
        **datetimeString** _pattern: _`/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/`_
    </ResponseField>

    <ResponseField name="dateFirstCompleted" type="string" >
        **datetimeString** _pattern: _`/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/`_
    </ResponseField>

    <ResponseField name="submitted" type="boolean" >
        For arenas. Whether or not the level has been added to the ladder.
    </ResponseField>

    <ResponseField name="published" type="boolean" >
        For shareable projects. Whether or not the project has been shared with classmates.
    </ResponseField>

</Expandable>
<Expandable title="Subset of properties listed here">

    <ResponseField name="_id" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="name" type="string" />
    <ResponseField name="displayName" type="string" />

    <ResponseField name="members" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="ownerID" type="string" >
        **objectIdString** _pattern: `/^[0-9a-f]{24}$/`_
    </ResponseField>

    <ResponseField name="description" type="string" />
    <ResponseField name="type" type="string" />
    <ResponseField name="kind" type="string" />
    <ResponseField name="metadata" />

</Expandable>