Home Reference Source
import {FeedList} from '@fnndsc/chrisapi'
public class | source

FeedList

Extends:

ResourceListResource → FeedList

Feed list resource object representing a list of user's feeds.

Constructor Summary

Public Constructor
public

constructor(url: string, auth: Object)

Constructor

Member Summary

Public Members
public

Method Summary

Public Methods
public

Fetch the ChRIS instance information from the REST API.

public

Fetch a list of compute resources from the REST API.

public

Fetch a list of file browser folders (the returned list only has at most one element) from the REST API.

public

getGroups(searchParams: Object, timeout: number): Promise<GroupList>

Fetch a list of groups from the REST API.

public

getPACSFiles(searchParams: Object, timeout: number): Promise<PACSFileList>

Fetch a list of PACS files from the REST API.

public

Fetch a list of PACS series from the REST API.

public

Fetch a list of pipeline source files from the REST API.

public

getPipelines(searchParams: Object, timeout: number): Promise<PipelineList>

Fetch a list of pipelines from the REST API.

public

getPluginAdmins(searchParams: Object, timeout: number): Promise<PluginAdminList>

Fetch a list of plugin admins.

public

Fetch a list of plugin instances from the REST API.

public

getPluginMetas(searchParams: Object, timeout: number): Promise<PluginMetaList>

Fetch a list of plugin metas from the REST API.

public

getPlugins(searchParams: Object, timeout: number): Promise<PluginList>

Fetch a list of plugins from the REST API.

public

getPublicFeeds(searchParams: Object, timeout: number): Promise<PublicFeedList>

Fetch a list of public feeds from the REST API.

public

getTags(searchParams: Object, timeout: number): Promise<TagList>

Fetch a list of tags from the REST API.

public

getUser(timeout: number): Promise<User>

Fetch currently authenticated user's information from the REST API.

public

getUserFiles(searchParams: Object, timeout: number): Promise<UserFileList>

Fetch a list of user files from the REST API.

Inherited Summary

From class Resource
public static

cloneObj(obj: Object): *

Helper method to make a deep copy clone of the passed object resource.

public get

Return true if the resource object contains any data.

public
public
public
public
public

Make a deep copy clone of this object resource.

From class ListResource
public get

Get the list of item data objects (REST API descriptors).

public get

Return true if the list resource object has a next list page in the paginated REST API.

public get

Return true if the list resource object has a previous list page in the paginated REST API.

public get

Get the total count of items of the entire collection across pages in the paginated REST API.

public
public
public
public
public

get(searchParams: Object, timeout: number): Promise<this>

Fetch this list resource from the REST API based on search parameters.

public

Get an item resource object given its id from the list of items in this list resource object.

public

Get an array of item resource objects corresponding to the items in this list resource object.

public

Get an array of parameter names that can be used as properties of the data object in POST requests.

public

Get an array of search parameter names that can be used as properties of the searchParams argument to the get method.

private

_getResource(linkRelation: string, ResourceClass: Object, searchParams: Object, timeout: number): Promise<ResourceClass>

Internal method to fetch a related resource from the REST API that is referenced by a link relation within this list resource's collection object.

private

_post(data: Object, uploadFileObj: Object, timeout: number): Promise<this>

Internal helper method to make a POST request to this list resource through the REST API.

Public Constructors

public constructor(url: string, auth: Object) source

Constructor

Override:

ListResource#constructor

Params:

NameTypeAttributeDescription
url string

url of the ChRIS service

auth Object
  • optional
  • default: null

authentication object

auth.token string
  • optional

authentication token

Public Members

public itemClass: Object source

Override:

ListResource#itemClass

Public Methods

public getChrisInstance(timeout: number): Promise<User> source

Fetch the ChRIS instance information from the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<User>

JS Promise, resolves to a ChrisInstance object

public getComputeResources(searchParams: Object, timeout: number): Promise<ComputeResourceList> source

Fetch a list of compute resources from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the ComputeResourceList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<ComputeResourceList>

JS Promise, resolves to a ComputeResourceList object

public getFileBrowserFolders(searchParams: Object, timeout: number): Promise<FileBrowserFolderList> source

Fetch a list of file browser folders (the returned list only has at most one element) from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the FileBrowserFolderList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<FileBrowserFolderList>

JS Promise, resolves to a FileBrowserFolderList object

public getGroups(searchParams: Object, timeout: number): Promise<GroupList> source

Fetch a list of groups from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the GroupList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<GroupList>

JS Promise, resolves to a GroupList object

public getPACSFiles(searchParams: Object, timeout: number): Promise<PACSFileList> source

Fetch a list of PACS files from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the PACSFileList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PACSFileList>

JS Promise, resolves to a PACSFileList object

public getPACSSeriesList(searchParams: Object, timeout: number): Promise<PACSSeriesList> source

Fetch a list of PACS series from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the PACSSeriesList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PACSSeriesList>

JS Promise, resolves to a PACSSeriesList object

public getPipelineSourceFiles(searchParams: Object, timeout: number): Promise<PipelineSourceFileList> source

Fetch a list of pipeline source files from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the PipelineSourceFileList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PipelineSourceFileList>

JS Promise, resolves to a PipelineSourceFileList object

public getPipelines(searchParams: Object, timeout: number): Promise<PipelineList> source

Fetch a list of pipelines from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the PipelineList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PipelineList>

JS Promise, resolves to a PipelineList object

public getPluginAdmins(searchParams: Object, timeout: number): Promise<PluginAdminList> source

Fetch a list of plugin admins.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginAdminList>

JS Promise, resolves to a PluginAdminList object

public getPluginInstances(searchParams: Object, timeout: number): Promise<AllPluginInstanceList> source

Fetch a list of plugin instances from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the AllPluginInstanceList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<AllPluginInstanceList>

JS Promise, resolves to a AllPluginInstanceList object

public getPluginMetas(searchParams: Object, timeout: number): Promise<PluginMetaList> source

Fetch a list of plugin metas from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the PluginMetaList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginMetaList>

JS Promise, resolves to a PluginMetaList object

public getPlugins(searchParams: Object, timeout: number): Promise<PluginList> source

Fetch a list of plugins from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the PluginList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginList>

JS Promise, resolves to a PluginList object

public getPublicFeeds(searchParams: Object, timeout: number): Promise<PublicFeedList> source

Fetch a list of public feeds from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the PublicFeedList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PublicFeedList>

JS Promise, resolves to a PublicFeedList object

public getTags(searchParams: Object, timeout: number): Promise<TagList> source

Fetch a list of tags from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the TagList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<TagList>

JS Promise, resolves to a TagList object

public getUser(timeout: number): Promise<User> source

Fetch currently authenticated user's information from the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<User>

JS Promise, resolves to a User object

public getUserFiles(searchParams: Object, timeout: number): Promise<UserFileList> source

Fetch a list of user files from the REST API.

Params:

NameTypeAttributeDescription
searchParams Object
  • optional
  • default: null

search parameters object which is resource-specific, the UserFileList.getSearchParameters method can be used to get a list of possible search parameters

searchParams.limit number
  • optional

page limit

searchParams.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<UserFileList>

JS Promise, resolves to a UserFileList object