mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
wpapi: some missing function
This commit is contained in:
Vendored
+22
@@ -27,6 +27,9 @@ declare class WPAPI {
|
||||
*/
|
||||
static discover(url: string): Promise<WPAPI>;
|
||||
|
||||
/** Start a request of plugin authors endpoint */
|
||||
authors(): WPAPI.WPRequest;
|
||||
|
||||
/** Start a request against /categories endpoint */
|
||||
categories(): WPAPI.WPRequest;
|
||||
|
||||
@@ -251,6 +254,13 @@ declare namespace WPAPI {
|
||||
*/
|
||||
get(callback?: Function): Promise<any>;
|
||||
|
||||
/**
|
||||
* Set the id of resource.
|
||||
*
|
||||
* @param id An ID of item
|
||||
*/
|
||||
id(id: number): WPRequest;
|
||||
|
||||
/**
|
||||
* Include specific resource IDs in the response collection.
|
||||
*
|
||||
@@ -373,6 +383,18 @@ declare namespace WPAPI {
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/**
|
||||
* Update the specified resource with the provided data
|
||||
*
|
||||
* This is the public interface for creating PATCH requests
|
||||
*
|
||||
* TODO: callback type
|
||||
*
|
||||
* @param data The data for the PATCH request
|
||||
* @param callback A callback to invoke with the results of the PATCH request
|
||||
*/
|
||||
update(data: Object, callback?: Function): Promise<any>;
|
||||
|
||||
/**
|
||||
* Validate whether the specified path parts are valid for this endpoint
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user