• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Jetpack a2z

Jetpack a2z

Jetpack a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php


Lines:

1 to 56 of 56
<?php

new WPCOM_JSON_API_List_Media_v1_1_Endpoint( array(
  'description' => 'Get a list of items in the media library.',
  'group'       => 'media',
  'stat'        => 'media',
  'min_version' => '1.1',
  'max_version' => '1.1',
  'method'      => 'GET',
  'path'        => '/sites/%s/media/',
  'path_labels' => array(
    '$site' => '(int|string) Site ID or domain',
  ),

  'query_parameters' => array(
    'number'    => '(int=20) The number of media items to return. Limit: 100.',
    'offset'    => '(int=0) 0-indexed offset.',
    'page'     => '(int) Return the Nth 1-indexed page of posts. Takes precedence over the <code>offset</code> parameter.',
    'page_handle' => '(string) A page handle, returned from a previous API call as a <code>meta.next_page</code> property. This is the most efficient way to fetch the next page of results.',
    'order'    => array(
      'DESC' => 'Return files in descending order. For dates, that means newest to oldest.',
      'ASC'  => 'Return files in ascending order. For dates, that means oldest to newest.',
    ),
    'order_by' => array(
      'date'          => 'Order by the uploaded time of each file.',
      'title'         => "Order lexicographically by file titles.",
      'ID'            => 'Order by media ID.',
    ),
    'search'    => '(string) Search query.',
    'post_ID'   => '(int) Default is showing all items. The post where the media item is attached. 0 shows unattached media items.',
    'mime_type' => "(string) Default is empty. Filter by mime type (e.g., 'image/jpeg', 'application/pdf'). Partial searches also work (e.g. passing 'image' will search for all image files).",
    'after'     => '(ISO 8601 datetime) Return media items uploaded after the specified datetime.',
    'before'    => '(ISO 8601 datetime) Return media items uploaded before the specified datetime.',
  ),

  'response_format' => array(
    'media' => '(array) Array of media objects',
    'found' => '(int) The number of total results found',
    'meta'  => '(object) Meta data',
  ),

  'example_request'      => 'https://public-api.wordpress.com/rest/v1.1/sites/82974409/media',
  'example_request_data' =>  array(
    'headers' => array(
      'authorization' => 'Bearer YOUR_API_TOKEN'
    )
  )
) );

/* class WPCOM_JSON_API_List_Media_v1_1_Endpoint */
/* function WPCOM_JSON_API_List_Media_v1_1_Endpoint::callback() – */
/* function WPCOM_JSON_API_List_Media_v1_1_Endpoint::build_page_handle() – */
/* function WPCOM_JSON_API_List_Media_v1_1_Endpoint::handle_where_for_page_handle() – */
/* function WPCOM_JSON_API_List_Media_v1_1_Endpoint::handle_date_range() – */
/* function WPCOM_JSON_API_List_Media_v1_1_Endpoint::handle_orderby_for_page_handle() – */
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      File name: json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php
      Plugin ref: Jetpack
      Version: 9.2
      Deprecated?: No
      API Letters: C,E,J,W

      Related

      Published: 27 November 2019 | Last updated: 27 November 2019

      Primary Sidebar

      Information

      File name: json-endpoints/class.wpcom-json-api-list-media-v1-1-endpoint.php
      Plugin ref: Jetpack
      Version: 9.2
      Deprecated?: No
      API Letters: C,E,J,W

      json-endpoints

      Footer

      Jetpack a2z
      Jetpack a2z
      Jetpack a2z
      WordPress 5.6
      WordPress a2z
      WordPress core a2z
      Genesis Theme Framework a2z
      Jetpack a2z
      WordPress develop tests
      Easy Digital Downloads a2z
      WooCommerce a2z
      Yoast SEO a2z
      WordPress Blocks

      Site:  jetpack.wp-a2z.org
      © Copyright Jetpack a2z 2014-2021. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins

      • Home
      • Blog
      • Sitemap
      • Sites