Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected appOptions

appOptions: IAppOptions

createRoute

createRoute: string = "articles/{articleId}/ratings/"

deleteAllRoute

deleteAllRoute: string = "articles/{articleId}/ratings"

deleteRoute

deleteRoute: string = "articles/{articleId}/ratings/{id}"

findByUserRoute

findByUserRoute: string = "articles/{articleId}/users/{username}/ratings/{?embed,fields}"

findRoute

findRoute: string = "articles/{articleId}/ratings{?page,rpp,sort,embed,fields}"

getRoute

getRoute: string = "articles/{articleId}/ratings/{id}/{?embed,fields}"

Protected modelMapper

modelMapper: ModelMapper

updateRoute

updateRoute: string = "articles/{articleId}/ratings/{id}"

Protected utility

utility: Utility

Methods

Protected baseCreate

  • baseCreate(route: string, data?: any): any
  • Parses get resource route which must be expanded with the Id of the previously created resource in the system.

    method
    example

    baseRoute.create();

    Parameters

    • route: string
    • Optional data: any

    Returns any

    get resource uri

Protected baseDelete

  • baseDelete(route: string, data: any, options?: IOptions, linkName?: string): any
  • Parses delete resource route.

    method
    example

    baseRoute.delete();

    Parameters

    • route: string
    • data: any
    • Optional options: IOptions
    • Optional linkName: string

    Returns any

    delete resource uri.

Protected baseFind

  • baseFind(route: string, options?: IOptions): any
  • Parses resources route which can be expanded with additional options. Supported items are:

    • searchQuery - A string value used to identify resources using the phrase search.
    • page - A value used to set the page number, i.e. to retrieve certain resource subset from the storage.
    • rpp - A value used to limit the size of result set per page.
    • sort - A string used to set the resource property to sort the result collection by.
    • embed - Comma separated list of resources to be contained within the current representation.
    method
    example

    baasicBaseDefinition.find();

    Parameters

    • route: string
    • Optional options: IOptions

    Returns any

    Query resources uri with search params

Protected baseGet

  • baseGet(route: string, id?: any, options?: any, propName?: string): any
  • Parses get resource route which must be expanded with the Id of the previously created resource in the system.

    method
    example

    baseRoute.get(route, id);

    Parameters

    • route: string
    • Optional id: any
    • Optional options: any
    • Optional propName: string

    Returns any

    get resource uri

Protected baseUpdate

  • baseUpdate(route: string, data: any, options?: IOptions, linkName?: string): any
  • Parses get resource route.

    method
    example

    baseRoute.update();

    Parameters

    • route: string
    • data: any
    • Optional options: IOptions
    • Optional linkName: string

    Returns any

    update resource uri

create

  • Parses create article rating route; this URI does not support any additional embed items.

    method
    example

    articleInstanceRatingsRoute.create(data);

    Parameters

    • data: IRating

      An article rating object that needs to be inserted into the system.

    Returns any

createParams

  • createParams(data: any, prop?: string): any
  • Parameters

    • data: any
    • Optional prop: string

    Returns any

delete

  • Parses delete article rating route; this URI does not support any additional embed items.

    method
    example

    articleInstanceRatingsRoute.delete(data);

    Parameters

    • data: IRating

      Rating resource resource that needs to be deleted.

    Returns any

deleteAll

  • Parses delete article rating route; this URI does not support any additional embed items.

    method
    example

    articleInstanceRatingsRoute.deleteAll(data);

    Parameters

    • data: IArticle

      Article object whose ratings needs to be deleted.

    Returns any

deleteParams

  • deleteParams(data: any): any
  • Parameters

    • data: any

    Returns any

find

  • find(articleId: string, options?: IOptions): any
  • Parses find article rating route which can be expanded with additional options. Supported items are:

    • searchQuery - A string referencing article rating properties using the phrase or BQL (Baasic Query Language) search.
    • page - A value used to set the page number, i.e. to retrieve certain article rating subset from the storage.
    • rpp - A value used to limit the size of result set per page.
    • sort - A string used to set the article rating property to sort the result collection by.
    • embed - Comma separated list of resources to be contained within the current representation.
    method
    example

    articleInstanceRatingsRoute.find({searchQuery: ''});

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose rating resources need to be retrieved.

    • Optional options: IOptions

      Query resource options object.

    Returns any

findByUser

  • findByUser(articleId: string, username: string, options?: IOptions): any
  • Parses findByUser article rating route which can be expanded with additional options. Supported items are:

    • username - A value that uniquely identifies a user which has created an article rating.
    • page - A value used to set the page number, i.e. to retrieve certain article rating subset from the storage.
    • rpp - A value used to limit the size of result set per page.
    • sort - A string used to set the article rating property to sort the result collection by.
    • embed - Comma separated list of resources to be contained within the current representation.
    method
    example

    articleInstanceRatingsRoute.find({username: ''});

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose rating resources need to be retrieved.

    • username: string

      Username which uniquely identifies a user which has created an article rating.

    • Optional options: IOptions

      Query resource options object.

    Returns any

get

  • Parses get article rating route which must be expanded with the Id of the previously created article rating resource in the system. Additional expand supported items are:

    • embed - Comma separated list of resources to be contained within the current representation.
    method
    example

    articleInstanceRatingsRoute.get({id: ''});

    Parameters

    • articleId: any

      Article slug or id which uniquely identifies article whose rating resources need to be retrieved.

    • id: string

      Article slug or id which uniquely identifies article resource that needs to be retrieved.

    • Optional options: IGetRequestOptions

      Options object that contains embed data.

    Returns any

parse

  • parse(route: string): any
  • Parses and expands URI templates based on RFC6570 specifications. For more information please visit the project GitHub page.

    method
    example

    baseRoute.parse('/{?embed,fields,options}').expand({embed: ''});

    Parameters

    • route: string

    Returns any

update

  • Parses update article rating route; this URI does not support any additional embed items.

    method
    example

    articleInstanceRatingsRoute.update(data);

    Parameters

    • data: IRating

      An article object used to update specified article resource.

    Returns any

updateParams

  • updateParams(data: any): any
  • Parameters

    • data: any

    Returns any

Generated using TypeDoc