Stash - danopia/deviantart-difi GitHub Wiki

More information about this class can be obtained by studying the stash.js and stash.page.js file.

lookup_email

Returns the email address of a user?

Usage

Unknown, most certainly on the admin pages

Params

  • username: string

Response

  • On success, undocumented

  • On fail:

    • error: object
      • code: "ERR_DIFI_ACCESS_DENIED"
      • human: "DiFi Security Access Error"
    • details: object
      • text: "access was not granted by any rule"
      • privs: array

create_journal

Creates a new journal draft

Params

  • deviantid: int (e.g. "15722926")
  • title: string (e.g. "Devious Journal Draft")
  • value: string (e.g. "Here is my journal")
  • unknown: number (e.g. -1)
  • metadata: object
    • skinid: int (e.g. "12655479")
    • skin_authorid: int (e.g. "15722926")
    • fullview: boolean (e.g. false)
    • song: string
    • book: string
    • movie: string
    • game: string
    • food: string
    • drink: string
    • flip: boolean (e.g. true)

Response

  • On success:

    • stashid: int (e.g. 781795417)
    • privateid:int (e.g. 237513384821359)
    • version: number (e.g. 0)
    • hash: ???
    • thumb: string (containing html)
    <div class="tt-a sq tt-freeform" collect_rid="1:781795417" usericon="https://a.deviantart.net/avatars/d/r/drsdavidsoft.jpg?4" userid="27200967" username="DRSDavidSoft" symbol="=" category="">
        <span class="tt-w">
            <span class="shadow" ><a href="https://drsdavidsoft.deviantart.com/art/Devious-Journal-Draft-781795417" data-sigil="thumb" class="thumb lit" onmouseover="if (window.LitBox) LitBox.hover(this, true)" onmouseout="if (window.LitBox) LitBox.out(this)"><i></i><img class="lit" src="https://st.deviantart.net/minish/main/defaulttag2.png"><span class="wrap" style="width: 150px"><q>
            <strong>Devious Journal Draft</strong>Here is my journal</q></span></a></span><!-- ^TTT --><a href="https://drsdavidsoft.deviantart.com/art/Devious-Journal-Draft-781795417" class="t" title="Devious Journal Draft by DRSDavidSoft, Dec 18, 2018"><span class="tt-fh-oe">Devious Journal Draft</span></a><small></small><!-- TTT$ -->
        </span>
    </div>
    • url: string (e.g. https://sta.sh/randomstr)
    • short_url: string (e.g. https://sta.sh/randomstr)
    • title_error: null
  • On fail:

    • error:
      • code: "ERR_UNAUTHORIZED"
      • human: "Unauthorized"

update_journal

Updates a journal draft

Params

  • deviation_id: int (e.g. "642421342")
  • deviation_version: number (e.g. "0")
  • title: string (e.g. "Devious Journal Draft")
  • value: string (e.g. "Here is my journal")
  • metadata: object
    • skinid: int (e.g. "12655479")
    • skin_authorid: int (e.g. "15722926")
    • fullview: boolean (e.g. false)
    • song: string
    • book: string
    • movie: string
    • game: string
    • food: string
    • drink: string
    • flip: boolean (e.g. true)

Response

Same as create_journal

get_groups_having_skins

Returns a list of joined groups that have installed skins?

Params

none

Response

  • On success, returns:
    • groups: array containing objects
      • userid: number, the group id
      • username: string, the group user name

get_skins

Returns list of installed Skins for a any user.

Usage

  • Called when accessing skins.

Params

  • username: string (e.g. "hq")

Response

An array containing arrays.

The array elements in order are:

  • ???: number, e.g. 0
  • skinid: number
  • html: string, containing the skin id, skin name and skin thumb

get_pager_html

Returns pagination html for stash pages?

Params

  • current_folderid: string (e.g. "4299857874503359")
  • view: string (e.g. "root")
  • offset: string (e.g. "0")
  • limit: string (e.g. "360")

Response

<div class="pagination-wrapper " data-sigil="manual-paging" >
    <div class="pagination both-paddles-disabled">
        <ul class="pages">
            <li class="prev"><a class="disabled"><span>Prev</span></a></li>
            <li class="next"><a class="disabled"><span>Next</span></a></li>
        </ul>
    </div>
</div>

save_defaults

Usage

Params

  • deviationid: string (e.g. "629604259")
  • defaults: object, e.g.:
    {
        "groups": {},
        "generate_track_id": true,
        "generate_track_type": "ga_submit_new",
        "notify_devwatch": true,
        "authoronly": false,
        "image_size": "0",
        "more_options": true,
        "more_pubmods": true,
        "remember_settings": false,
        "agreements": {
            "accept-submission-policy": true,
            "accept-tos": true
        },
        "gallery": {
            "27202808": false
        },
        "print": false,
        "auto_print": true,
        "application": false
    }

Response

fetch_thumb_preview_for_deviationids

Usage

Params

  • ???: object

Response

get_delta

undocumented

Usage

Params

  • cursor:

Response

get_cursor

undocumented

Usage

Params

None

Response

publishto

undocumented

Usage

Params

  • deviationid: int (e.g. 780240862)
  • options: object, e.g.
    {
        "groups": {},
        "generate_track_id": true,
        "generate_track_type": "ga_submit_new",
        "notify_devwatch": true,
        "authoronly": false,
        "image_size": "0",
        "more_options": false,
        "more_pubmods": false,
        "remember_settings": false,
        "agreements": {
            "accept-submission-policy": true,
            "accept-tos": true
        },
        "gallery": {},
        "print": false,
        "auto_print": true,
        "application": false,
        "contestid": "0"
    }

Response

update_schedule

undocumented

check_schedule

undocumented

check_deviation_for_submission

undocumented

Params

  • deviationid: number
  • options:

Response

get_skins_picker

undocumented

Params

  • ??? : object

Response

space

Returns the available capacity in bytes?

Usage

undocumented

Params

None

Response

  • On success:
    • available_space: number, e.g. 2146898988

getHeaderHTML

Returns the Stash webpage header in HTML format.

Pretty much just contains the menubar.

Params

None

Response

Returns a Dialog object.

⚠️ **GitHub.com Fallback** ⚠️