-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #309 from gunjandatta/gdatta
New Enhancements and V2 API
- Loading branch information
Showing
42 changed files
with
3,094 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { IBaseExecution } from "gd-sprest-def/lib/base"; | ||
import { drive } from "gd-sprest-def/lib/Microsoft/Graph/entityTypes"; | ||
import { ITargetInfoProps } from "../utils"; | ||
|
||
/** | ||
* #### REST API | ||
* _api/v2.0/drive | ||
* | ||
* #### Get the default library for a site. | ||
* | ||
* ```typescript | ||
* import { Drives } from "gd-sprest"; | ||
* | ||
* Drives().execute(drives => { | ||
* drives.forEach(...); | ||
* }); | ||
* ``` | ||
*/ | ||
export const drive: Idrive; | ||
|
||
/** | ||
* Drive | ||
* The v2.0 REST endpoint. | ||
* @category Drive | ||
*/ | ||
export interface Idrive { | ||
/** | ||
* Get the default library for a site. | ||
* @param id - (Optional) The site id to target, current by default. | ||
* @param targetInfo - (Optional) The target information. | ||
*/ | ||
(id?: string, targetInfo?: ITargetInfoProps): IBaseExecution<drive>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { IBaseExecution } from "gd-sprest-def/lib/base"; | ||
import { driveCollection } from "gd-sprest-def/lib/Microsoft/Graph/entityTypes"; | ||
import { ITargetInfoProps } from "../utils"; | ||
|
||
/** | ||
* #### REST API | ||
* _api/v2.0/drives | ||
* | ||
* #### Get the libraries for a site. | ||
* | ||
* ```typescript | ||
* import { Drives } from "gd-sprest"; | ||
* | ||
* Drives().execute(drives => { | ||
* drives.forEach(...); | ||
* }); | ||
* ``` | ||
*/ | ||
export const drives: Idrives; | ||
|
||
/** | ||
* Drives | ||
* The v2.0 REST endpoint. | ||
* @category Drives | ||
*/ | ||
export interface Idrives { | ||
/** | ||
* Get the libraries for a site. | ||
* @param id - (Optional) The site id to target, current by default. | ||
* @param targetInfo - (Optional) The target information. | ||
*/ | ||
(id?: string, targetInfo?: ITargetInfoProps): IBaseExecution<driveCollection>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./drive"; | ||
export * from "./drives"; | ||
export * from "./sites"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { IBaseExecution } from "gd-sprest-def/lib/base"; | ||
import { sites } from "gd-sprest-def/lib/Microsoft/Graph/api"; | ||
import { list, listMethods, siteMethods } from "gd-sprest-def/lib/Microsoft/Graph/entityTypes"; | ||
import { ITargetInfoProps } from "../utils"; | ||
|
||
/** | ||
* #### REST API | ||
* _api/v2.0/sites | ||
* | ||
* #### Get the current site | ||
* | ||
* ```typescript | ||
* import { Sites } from "gd-sprest"; | ||
* | ||
* Sites().execute(site => { | ||
* let siteTitle = site.title; | ||
* }); | ||
* ``` | ||
*/ | ||
export const sites: Isites; | ||
|
||
/** | ||
* Sites | ||
* The v2.0 REST endpoint. | ||
* @category Sites | ||
*/ | ||
export interface Isites { | ||
/** | ||
* Creates an instance of the site library. | ||
* @param id - (Optional) The site id to target, current by default. | ||
* @param targetInfo - (Optional) The target information. | ||
*/ | ||
(id?: string, targetInfo?: ITargetInfoProps): siteMethods & sites; | ||
|
||
/** Returns the current web. */ | ||
static getCurrentWeb(): IBaseExecution<sites> & siteMethods; | ||
|
||
/** Returns a list from the current web. */ | ||
static getList(title: string): IBaseExecution<list> & listMethods; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.