Skip to:
Content

BuddyPress.org

Changeset 14042


Ignore:
Timestamp:
10/09/2024 04:36:10 AM (4 weeks ago)
Author:
imath
Message:

Documentation: start documenting v2 of the BP REST API

Add the following page to developer doc:

  • Introduction about the BP REST API
  • Reference: list of REST API Routes
  • Components routes
  • Members routes

NB: this commit also improves Components and Members REST controllers item schemas.

See https://buddypress.trac.wordpress.org/ticket/9145
Closes https://github.com/buddypress/buddypress/pull/382

Location:
trunk
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/developer/README.md

    r14038 r14042  
    13133. [BuddyPress Theme Compatibility](./theme-compat/README.md)
    14144. [BuddyPress execution contexts](./execution-contexts/README.md)
     155. [BuddyPress REST API (v2)](./execution-contexts/rest-api/README.md)
  • trunk/docs/developer/execution-contexts/README.md

    r14038 r14042  
    551. Theme/front-end
    662. [Ajax](./ajax.md)
    7 3. REST API
     73. [REST API](./rest-api/README.md)
    884. Administration
  • trunk/docs/developer/manifest.json

    r14038 r14042  
    7373    },
    7474    {
     75        "title": "BuddyPress REST API",
     76        "slug": "bp-rest-api",
     77        "markdown_source": "../developer/execution-contexts/rest-api/README.md",
     78        "parent": null
     79    },
     80    {
     81        "title": "BP REST API Reference",
     82        "slug": "bp-rest-api-reference",
     83        "markdown_source": "../developer/execution-contexts/rest-api/reference.md",
     84        "parent": "bp-rest-api"
     85    },
     86    {
     87        "title": "Components REST API routes",
     88        "slug": "bp-rest-api-components",
     89        "markdown_source": "../developer/execution-contexts/rest-api/components.md",
     90        "parent": "bp-rest-api-reference"
     91    },
     92    {
     93        "title": "Members REST API routes",
     94        "slug": "bp-rest-api-members",
     95        "markdown_source": "../developer/execution-contexts/rest-api/members.md",
     96        "parent": "bp-rest-api-reference"
     97    },
     98    {
    7599        "title": "BuddyPress Functions",
    76100        "slug": "bp-functions",
  • trunk/src/bp-core/classes/class-bp-core-components-rest-controller.php

    r14028 r14042  
    432432            'title'       => $data['title'],
    433433            'description' => $data['description'],
    434             'features'    => array(),
     434            'features'    => null,
    435435        );
    436436
     
    476476                    break;
    477477                default:
    478                     $features = array();
     478                    $features = null;
    479479                    break;
    480480            }
     
    553553                    ),
    554554                    'features'    => array(
     555                        'context'     => array( 'view', 'edit' ),
    555556                        'description' => __( 'Information about active features for the component.', 'buddypress' ),
    556                         'type'        => 'array',
    557                         'context'     => array( 'view', 'edit' ),
    558                         'default'     => array(),
     557                        'type'        => array( 'object', 'null' ),
     558                        'properties'  => array(),
     559                        'default'     => null,
    559560                    ),
    560561                ),
  • trunk/src/bp-members/classes/class-bp-members-rest-controller.php

    r14034 r14042  
    11191119                            ),
    11201120                        ),
    1121                         'format'      => 'date-time',
    11221121                        'context'     => array( 'view', 'edit' ),
    11231122                        'readonly'    => true,
Note: See TracChangeset for help on using the changeset viewer.