Skip to content

Commit

Permalink
1. Changed property value param to accept array of strings in select,
Browse files Browse the repository at this point in the history
expand, orderby methods.
2. Fixed compilation error by adding required libraries in config.
  • Loading branch information
muthurathinam-m committed May 23, 2018
1 parent a12bd44 commit 5f44a2b
Show file tree
Hide file tree
Showing 12 changed files with 413 additions and 383 deletions.
768 changes: 397 additions & 371 deletions lib/graph-js-sdk-web.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/spec/core/responseHandling.d.ts
@@ -0,0 +1 @@
export {};
1 change: 1 addition & 0 deletions lib/spec/core/urlGeneration.d.ts
@@ -0,0 +1 @@
export {};
2 changes: 1 addition & 1 deletion lib/spec/core/urlGeneration.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/spec/core/urlParsing.d.ts
@@ -0,0 +1 @@
export {};
2 changes: 1 addition & 1 deletion lib/spec/core/urlParsing.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions lib/src/GraphRequest.d.ts
Expand Up @@ -16,9 +16,9 @@ export declare class GraphRequest {
private urlJoin(urlSegments);
buildFullUrl(): string;
version(v: string): GraphRequest;
select(properties: string | [string]): GraphRequest;
expand(properties: string | [string]): GraphRequest;
orderby(properties: string | [string]): GraphRequest;
select(properties: string | string[]): GraphRequest;
expand(properties: string | string[]): GraphRequest;
orderby(properties: string | string[]): GraphRequest;
filter(filterStr: string): GraphRequest;
top(n: number): GraphRequest;
skip(n: number): GraphRequest;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/GraphRequest.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/src/ResponseHandler.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/GraphRequest.ts
Expand Up @@ -127,17 +127,17 @@ export class GraphRequest {
* and .select("displayName", "birthday")
*
*/
select(properties:string|[string]):GraphRequest {
select(properties:string|string[]):GraphRequest {
this.addCsvQueryParamater("$select", properties, arguments);
return this;
}

expand(properties:string|[string]):GraphRequest {
expand(properties:string|string[]):GraphRequest {
this.addCsvQueryParamater("$expand", properties, arguments);
return this;
}

orderby(properties:string|[string]):GraphRequest {
orderby(properties:string|string[]):GraphRequest {
this.addCsvQueryParamater("$orderby", properties, arguments);
return this;
}
Expand Down Expand Up @@ -174,7 +174,7 @@ export class GraphRequest {
}

// helper for $select, $expand and $orderby (must be comma separated)
private addCsvQueryParamater(propertyName:string, propertyValue:string|[string], additionalProperties:IArguments) {
private addCsvQueryParamater(propertyName:string, propertyValue:string|string[], additionalProperties:IArguments) {
// if there are already $propertyName value there, append a ","
this.urlComponents.oDataQueryParams[propertyName] = this.urlComponents.oDataQueryParams[propertyName] ? this.urlComponents.oDataQueryParams[propertyName] + "," : "";

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -7,6 +7,7 @@
"removeComments": true,
"sourceMap": true,
"target": "es5",
"lib": ["es6", "dom"],
"declaration": true,
"outDir": "lib/"
},
Expand Down

0 comments on commit 5f44a2b

Please sign in to comment.