Menu - danopia/deviantart-difi GitHub Wiki

This class is used to get information on different menus on deviantART, from the news to the moods.

get

Returns basic information on the current page and the pages below it.

Usage

  • When navigating via DiFi
  • When using the mood explorer for comments
  • When loading a list of friends in a Modal
  • When getting a user's list of collection items
  • When browsing art from a Modal
  • Getting categories

Params

  • path: string, path to the current page
    • "gallections/danopia/20" (i.e. gallery folders of the user danopia)
    • "friends/danopia"
    • "mood" (deprecated)
    • "art"
    • "art/digitalart/3d/characters"
  • maxdepth: number, how far down to list children. 1-2 is valid on menus, 1-3 for moods

Example

Using a GET method works fine:

https://deviantart.com/global/difi/?t=json&c[]=Menu;get;art,2

or:

https://deviantart.com/global/difi/?t=json&c[]=Menu;get;gallections/danopia/20,2

Response

Returns an object that can be used to build a dynamic navigation menu.

  • Example for gallections/danopia/20

    {"href":"http:\/\/danopia.deviantart.com\/gallery\/",
     "path":["gallections","danopia","20"],
     "children":[
      {"title":"Featured",
       "href":"http:\/\/danopia.deviantart.com\/gallery\/27813554",
       "path":["gallections","danopia","20",27813554],
       "id":27813554},
      {"title":"Photography",
       "href":"http:\/\/danopia.deviantart.com\/gallery\/27914649",
       "path":["gallections","danopia","20",27914649],
       "id":27914649},
      {"title":"Art",
       "href":"http:\/\/danopia.deviantart.com\/gallery\/27914651",
       "path":["gallections","danopia","20",27914651],"id":27914651}],
       "title":"Gallery Folders"}}}
    
  • Example for mood/1 (deprecated)

    {"path":["mood"],
     "title":"Moods",
     "children":[
      {"path":["mood","1"],
       "title":"Love",
       "children":[
        {"path":["mood","1","2"],
         "title":"Affection",
         "children":[]},
        {"path":["mood","1","3"],
         "title":"Longing",
         "children":[]},
        . . .
      {"path":["mood","24"],
       "title":"Joy",
       "children":[
        {"path":["mood","24","25"],
         "title":"Cheerful",
         "children":[]},
    . . .