Skip to content

Commit 55c308a

Browse files
authored
Merge pull request #63 from lahuey/lahuey/RemoveSuperAgentDependency
Use the Fetch API instead of SuperAgent to communicate with MS Graph
2 parents 9a086ac + 43c6f84 commit 55c308a

27 files changed

+4136
-3201
lines changed

lib/graph-js-sdk-web.js

Lines changed: 3415 additions & 2876 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import 'isomorphic-fetch';

lib/spec/core/responseHandling.js

Lines changed: 28 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/spec/core/responseHandling.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/GraphHelper.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export declare class GraphHelper {
2+
static serializeContent(content: any): any;
3+
}

lib/src/GraphHelper.js

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/GraphHelper.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/GraphRequest.d.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Promise } from 'es6-promise';
2+
import 'isomorphic-fetch';
23
import { Options, URLComponents, GraphRequestCallback } from "./common";
34
export declare class GraphRequest {
45
config: Options;
@@ -16,9 +17,9 @@ export declare class GraphRequest {
1617
private urlJoin(urlSegments);
1718
buildFullUrl(): string;
1819
version(v: string): GraphRequest;
19-
select(properties: string | [string]): GraphRequest;
20-
expand(properties: string | [string]): GraphRequest;
21-
orderby(properties: string | [string]): GraphRequest;
20+
select(properties: string | string[]): GraphRequest;
21+
expand(properties: string | string[]): GraphRequest;
22+
orderby(properties: string | string[]): GraphRequest;
2223
filter(filterStr: string): GraphRequest;
2324
top(n: number): GraphRequest;
2425
skip(n: number): GraphRequest;
@@ -34,14 +35,15 @@ export declare class GraphRequest {
3435
update(content: any, callback?: GraphRequestCallback): Promise<any>;
3536
del(callback?: GraphRequestCallback): Promise<any>;
3637
get(callback?: GraphRequestCallback): Promise<any>;
37-
private routeResponseToPromise(requestBuilder);
38-
private routeResponseToCallback(requestBuilder, callback);
39-
private sendRequestAndRouteResponse(requestBuilder, callback?);
38+
private routeResponseToPromise(request);
39+
private routeResponseToCallback(request, callback);
40+
private sendRequestAndRouteResponse(request, callback?);
4041
getStream(callback: GraphRequestCallback): void;
4142
putStream(stream: any, callback: Function): void;
42-
private configureRequest(requestBuilder, accessToken);
43+
private configureRequest(request, accessToken);
4344
query(queryDictionaryOrString: string | {
4445
[key: string]: string | number;
4546
}): GraphRequest;
4647
private createQueryString();
48+
private convertResponseType(response);
4749
}

0 commit comments

Comments
 (0)