Skip to content

Commit

Permalink
dnn-sxc-angular improvements docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maaaximum-at-2sic committed Mar 10, 2022
1 parent 5dff085 commit 3e9cd24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,6 @@ export class Api {
private controller: string
) { }

/**
* Do a GET request to the specified 2sxc api controller
*/
// fetch<T>(url: string): Observable<T>;

/**
* Do a POST request to the specified 2sxc api controller with the specified body
*/
// fetch<T>(url: string, body: T): Observable<T>;

/**
* Do a request to the specified 2sxc api controller method with the specified body
*/
// fetch<T>(url: string, body: T, verb: string): Observable<T>;

/**
* Internal implementation of fetch
*/
// fetch<T>(method: string, body: T = null, verb: string = null, params?: HttpParams): Observable<T[]> | Observable<T> {
// const fullUrl = `${routeApi}/${this.controller}/${method}`;

// if (body && !verb || body && verb.toLocaleLowerCase() === 'post')
// return this.http.post<T>(fullUrl, body, { params });

// if (body && verb.toLocaleLowerCase() === 'put')
// return this.http.put<T>(fullUrl, body, { params });

// if (body && verb.toLocaleLowerCase() === 'delete')
// return this.http.delete<T>(fullUrl, { params });

// return this.http.get<T>(fullUrl, { params });
// }



/**
* Get the request URL of the api
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ export class Query<T> {
getAll(): Observable<T>;

/**
* Get an object with all the streams, each containing an array of all the data in that stream with url-parameters as HttpParams or string
* Get an object with all the streams, each containing an array of all the data in that stream
* with url-parameters as HttpParams or string
*/
getAll(params: HttpParams | string): Observable<T>;

/**
* Get an object with all the streams, each containing an array of all the data in that stream with url-parameters as string
* Get an object with all the streams, each containing an array of all the data in that stream
* with url-parameters as HttpParams or string using post data
*/
getAll(params: HttpParams | string, data: T): Observable<T>;

Expand All @@ -51,12 +53,14 @@ export class Query<T> {
getStream(stream: string): Observable<T>;

/**
* Get an object with the specified stream, containing an array of all the data in that stream with url-parameters as HttpParams or string
* Get an object with the specified stream, containing an array of all the data in that stream
* with url-parameters as HttpParams or string
*/
getStream(stream: string, params: HttpParams | string): Observable<T>;

/**
* Get an object with the specified stream, containing an array of all the data in that stream with url-parameters as string
* Get an object with the specified stream, containing an array of all the data in that stream
* with url-parameters as HttpParams or string using post data
*/
getStream(stream: string, params: HttpParams | string, data: T): Observable<T>;

Expand Down Expand Up @@ -85,7 +89,8 @@ export class Query<T> {
getStreams(streams: string[], params: HttpParams | string): Observable<T>;

/**
* Get an object with the specified streams, each containing an array of all the data in that stream with url-parameters as string
* Get an object with the specified streams, each containing an array of all the data in that stream
* with url-parameters as HttpParams or string using post data
*/
getStreams(streams: string[], params: HttpParams | string, data: T): Observable<T>;

Expand Down

0 comments on commit 3e9cd24

Please sign in to comment.