Skip to content

Commit 35c804d

Browse files
committed
Adding more information in the return comments for functions returning the GraphRequest instance
1 parent 4a63220 commit 35c804d

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/GraphRequest.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ export class GraphRequest {
308308
* Sets values into the urlComponents property of GraphRequest object.
309309
* @param {string} paramKey - the query parameter key
310310
* @param {string} paramValue - the query paramter value
311+
* @returns nothing
311312
*/
312313
private setURLComponentsQueryParamater(paramKey: string, paramValue: string | number): void {
313314
if (oDataQueryNames.indexOf(paramKey) !== -1) {
@@ -483,7 +484,7 @@ export class GraphRequest {
483484
* @public
484485
* To add properties for select OData Query param
485486
* @param {string|string[]} properties - The Properties value
486-
* @returns The same GraphRequest instance that is being called with
487+
* @returns The same GraphRequest instance that is being called with, after adding the properties for $select query
487488
*/
488489
/*
489490
* Accepts .select("displayName,birthday")
@@ -500,7 +501,7 @@ export class GraphRequest {
500501
* @public
501502
* To add properties for expand OData Query param
502503
* @param {string|string[]} properties - The Properties value
503-
* @returns The same GraphRequest instance that is being called with
504+
* @returns The same GraphRequest instance that is being called with, after adding the properties for $expand query
504505
*/
505506
public expand(properties: string | string[]): GraphRequest {
506507
this.addCsvQueryParameter("$expand", properties, arguments);
@@ -511,7 +512,7 @@ export class GraphRequest {
511512
* @public
512513
* To add properties for orderby OData Query param
513514
* @param {string|string[]} properties - The Properties value
514-
* @returns The same GraphRequest instance that is being called with
515+
* @returns The same GraphRequest instance that is being called with, after adding the properties for $orderby query
515516
*/
516517
public orderby(properties: string | string[]): GraphRequest {
517518
this.addCsvQueryParameter("$orderby", properties, arguments);
@@ -522,7 +523,7 @@ export class GraphRequest {
522523
* @public
523524
* To add query string for filter OData Query param. The request URL accepts only one $filter Odata Query option and its value is set to the most recently passed filter query string.
524525
* @param {string} filterStr - The filter query string
525-
* @returns The same GraphRequest instance that is being called with
526+
* @returns The same GraphRequest instance that is being called with, after adding the $filter query
526527
*/
527528
public filter(filterStr: string): GraphRequest {
528529
this.urlComponents.oDataQueryParams.$filter = filterStr;
@@ -533,7 +534,7 @@ export class GraphRequest {
533534
* @public
534535
* To add criterion for search OData Query param. The request URL accepts only one $search Odata Query option and its value is set to the most recently passed search criterion string.
535536
* @param {string} searchStr - The search criterion string
536-
* @returns The same GraphRequest instance that is being called with
537+
* @returns The same GraphRequest instance that is being called with, after adding the $search query criteria
537538
*/
538539
public search(searchStr: string): GraphRequest {
539540
this.urlComponents.oDataQueryParams.$search = searchStr;
@@ -544,7 +545,7 @@ export class GraphRequest {
544545
* @public
545546
* To add number for top OData Query param. The request URL accepts only one $top Odata Query option and its value is set to the most recently passed number value.
546547
* @param {number} n - The number value
547-
* @returns The same GraphRequest instance that is being called with
548+
* @returns The same GraphRequest instance that is being called with, after adding the number for $top query
548549
*/
549550
public top(n: number): GraphRequest {
550551
this.urlComponents.oDataQueryParams.$top = n;
@@ -555,7 +556,7 @@ export class GraphRequest {
555556
* @public
556557
* To add number for skip OData Query param. The request URL accepts only one $skip Odata Query option and its value is set to the most recently passed number value.
557558
* @param {number} n - The number value
558-
* @returns The same GraphRequest instance that is being called with
559+
* @returns The same GraphRequest instance that is being called with, after adding the number for the $skip query
559560
*/
560561
public skip(n: number): GraphRequest {
561562
this.urlComponents.oDataQueryParams.$skip = n;
@@ -566,7 +567,7 @@ export class GraphRequest {
566567
* @public
567568
* To add token string for skipToken OData Query param. The request URL accepts only one $skipToken Odata Query option and its value is set to the most recently passed token value.
568569
* @param {string} token - The token value
569-
* @returns The same GraphRequest instance that is being called with
570+
* @returns The same GraphRequest instance that is being called with, after adding the token string for $skipToken query option
570571
*/
571572
public skipToken(token: string): GraphRequest {
572573
this.urlComponents.oDataQueryParams.$skipToken = token;
@@ -577,7 +578,7 @@ export class GraphRequest {
577578
* @public
578579
* To add boolean for count OData Query param. The URL accepts only one $count Odata Query option and its value is set to the most recently passed boolean value.
579580
* @param {boolean} isCount - The count boolean
580-
* @returns The same GraphRequest instance that is being called with
581+
* @returns The same GraphRequest instance that is being called with, after adding the boolean value for the $count query option
581582
*/
582583
public count(isCount: boolean = false): GraphRequest {
583584
this.urlComponents.oDataQueryParams.$count = isCount.toString();
@@ -588,7 +589,11 @@ export class GraphRequest {
588589
* @public
589590
* Appends query string to the urlComponent
590591
* @param {string|KeyValuePairObjectStringNumber} queryDictionaryOrString - The query value
591-
* @returns The same GraphRequest instance that is being called with
592+
* @returns The same GraphRequest instance that is being called with, after appending the query string to the url component
593+
*/
594+
/*
595+
* Accepts .query("displayName=xyz")
596+
* and .select({ name: "value" })
592597
*/
593598
public query(queryDictionaryOrString: string | KeyValuePairObjectStringNumber): GraphRequest {
594599
return this.parseQueryParameter(queryDictionaryOrString);

0 commit comments

Comments
 (0)