Home Reference Source
import PublishEdit from '~/models/Request/PublishEdit.js'
public class | source

PublishEdit

Extends:

Request → PublishEdit

Direct Subclass:

PublishDelete, PublishNuke

Represents an edit on a post or answer

Constructor Summary

Public Constructor
public

constructor(options: Object)

Method Summary

Public Methods
public

format()

Inherited Summary

From class Request
protected
public

cancel()

Cancels the request.

public

format(data: Object): Object

Formats the request object and returns an object of Request<T>'s T.

public

async run(o: Object): Promise

Performs the request

Public Constructors

public constructor(options: Object) source

Creates request given path. Provide options as object

Override:

Request#constructor

Params:

NameTypeAttributeDescription
options Object
options.item Answer | Post
options.original Answer | Post
  • nullable: true

An original can be passed to only change the changes

options.deleted boolean
  • optional
  • default: undefined

If should delete

Public Methods

public format() source

Formats the request object and returns an object of Request<T>'s T.

Override:

Request#format