Class: reflexContext

reflexContext()

Methods

(static) addids(url, num) → {feed}

Adds the num value to the ids(numbering data) with the specified url.
Parameters:
Name Type Description
url string url
num number number of additions
Source:
Returns:
- feed.title in results.
Type
feed

(static) allocids(url, num) → {feed}

Allocate the num value to the ids(numbering data) with the specified url.
Parameters:
Name Type Description
url string url
num number number to allocate
Source:
Returns:
- feed.title in results.
Type
feed

(static) count(url) → {number}

Returns the number of entry to the client by the specified url.
Parameters:
Name Type Description
url string url
Source:
Returns:
- results
Type
number

(static) delete(url) → {feed}

Deletes the entry data with the specified url.
Parameters:
Name Type Description
url string url
Source:
Returns:
result
Type
feed

(static) deleteFolder(url) → {feed}

Deletes the folder entry and descendants with the specified url.
Parameters:
Name Type Description
url string
Source:
Returns:
feed
Type
feed

(static) doResponse(feed, status_code)

Returns the feed to the client by the specified feed and status_code.
Parameters:
Name Type Description
feed feed feed to respond
status_code int http status code
Source:

(static) doResponseCsv(value, filename)

Returns the csv data to the client using the specified value and filename.
Parameters:
Name Type Description
value Array.<string> csv rows
filename string output file's name
Source:

(static) doResponseHtml(html)

Sends an content to the client using the specified html.
Parameters:
Name Type Description
html string output html contents
Source:

(static) fetch(url, init)

fetch provides an interface for fetching resources. Same as Fetch API if used locally.
See : https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Parameters:
Name Type Description
url string target url
init init init parameter object
Properties
Name Type Description
method string HTTP method
body string data body to send
Source:

(static) getContent(url) → {string}

Gets the content by the specified url.
Parameters:
Name Type Description
url string url
Source:
Returns:
- content
Type
string

(static) getContentType() → {string}

Gets the content type for this response.
Source:
Returns:
- content type
Type
string

(static) getCookies() → {feed}

Gets the cookies for this request.
Source:
Returns:
- cookies
Type
feed

(static) getCsv(header, items, parent, skip, encoding) → {feed}

Convert the csv data to the feed.
Parameters:
Name Type Description
header Array.<string> csv header
items Array.<string> csv items
parent string parent item(e.g.'entry')
skip number number to skip rows
encoding string encoding type
Source:
Returns:
- results
Type
feed

(static) getEntry(url) → {entry}

Returns the response entry to the client by the specified url.
Parameters:
Name Type Description
url string url
Source:
Returns:
- entry
Type
entry

(static) getFeed(url) → {feed}

Returns the response feed to the client by the specified url.
Parameters:
Name Type Description
url string url
Source:
Returns:
- feed
Type
feed

(static) getHeaders() → {feed}

Gets the headers for this request.
Source:
Returns:
- headers
Type
feed

(static) getHtml(url) → {string}

Gets the html content by the specified url.
Parameters:
Name Type Description
url string url
Source:
Returns:
- html content
Type
string

(static) getMail(settings) → {feed}

Gets the mail messages by the specified settings.
Parameters:
Name Type Description
settings settings mail settings
Source:
Returns:
- results
Type
feed

(static) getPathinfo() → {string}

Returns any extra path information associated with the URL the client sent when it made this request.
Source:
Returns:
- pathinfo
Type
string

(static) getQueryString(paramopt) → {string}

Returns the query string that is contained in the request URL after the path.
Parameters:
Name Type Attributes Description
param string <optional>
query parameter
Source:
Returns:
- query string
Type
string

(static) getRequest() → {feed}

Gets the feed data for this request.
Source:
Returns:
- request data
Type
feed

(static) getSettingValue() → {string}

Gets the setting value of the service(/_settings/properties) by the specified key.
Source:
Returns:
- setting value
Type
string

(static) getStatus() → {number}

Gets the status code for this response.
Source:
Returns:
- http status code
Type
number

(static) getUriAndQuerystring() → {string}

Returns the URL path and the query string.
Source:
Returns:
- the URL path and the query string.
Type
string

(static) httpmethod() → {string}

Gets the http method for this request.
Source:
Returns:
- httpmethod
Type
string

(static) log(message, titleopt, subtitleopt)

Outputs a message to the Admin Console.
Parameters:
Name Type Attributes Description
message string message to output
title string <optional>
title
subtitle string <optional>
subtitle
Source:

(static) post(request, url, force) → {feed}

Posts the request feed to the server with the specified url.
Parameters:
Name Type Description
request feed request feed
url string url
force boolean Forcibly execute even if it exceeds the upper limit of entries of request feed.
Source:
Returns:
- result
Type
feed

(static) put(request, force) → {feed}

Puts the request feed to the server.
Parameters:
Name Type Description
request feed request feed
force boolean Forcibly execute even if it exceeds the upper limit of entries of request feed.
Source:
Returns:
result
Type
feed

(static) rangeids(url, range)

Sets the range of the ids(numbering data) with the specified url.
Parameters:
Name Type Description
url string url
range string range
Source:

(static) RXID() → {string}

Gets the RXID
Source:
Returns:
- RXID
Type
string

(static) saveFiles(props)

Saves the files to the server with the specified props. This method is used simultaneously with file uploading.
Parameters:
Name Type Description
props props save files info.
Source:

(static) sendError(status_code, messageopt)

Sends an error response to the client using the specified status.
Parameters:
Name Type Attributes Description
status_code number http status code
message string <optional>
message to send
Source:

(static) sendMessage(status_code, message)

Sends an feed response(including message) to the client using the specified status.
Parameters:
Name Type Description
status_code number http status code
message string message to send
Source:

(static) sendRedirect(location)

Sends a temporary redirect response to the client using the specified redirect location URL.
Parameters:
Name Type Description
location string redirect url
Source:

(static) setHeader(name, value)

Sets a response header with the given name and value.
Parameters:
Name Type Description
name string header's name
value string header's value
Source:

(static) setids(url, num)

Sets the value to the ids(numbering data) with the specified url.
Parameters:
Name Type Description
url string url
num number value to set
Source:

(static) setStatus(status_code)

Sets the status code for this response.
Parameters:
Name Type Description
status_code number http status code
Source:

(static) toPdf(data, html, outfilename, baseurlopt)

Convert to PDF and sends it to the client using the specified data and html.
Parameters:
Name Type Attributes Description
data feed data
html string html template
outfilename string output filename
baseurl string <optional>
base PDF's url
Source:

(static) toXls(data, inputxls, outfilename)

Convert to Xls and sends it to the client using the specified data and inputxls.
Parameters:
Name Type Description
data feed data
inputxls string xls template
outfilename string output filename
Source:

(static) uid() → {string}

Gets the uid for this request. uid is a login user-specific code.
Source:
Returns:
- uid
Type
string