generated from aichner/react-mdb-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The default values and documentation of the instagram client have been improved.
- Loading branch information
Showing
1 changed file
with
8 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,27 +124,24 @@ class InstagramClient extends Client { | |
* | ||
* @constructor | ||
* @author Nico Schett <[email protected]> | ||
* @param url The base URL the GithubClient should be working on. | ||
* Default: "https://api.github.com/graphql". | ||
* @param url The base URL the InstagramClient should be working on. | ||
* Default: "https://graph.instagram.com" | ||
* @param headers A object containing various request headers | ||
* @param type A type description to differ between multiple instances | ||
*/ | ||
constructor( | ||
url: string = "https://api.github.com/graphql", | ||
headers: { accessToken: string }, | ||
accessToken: string, | ||
url: string = "https://graph.instagram.com", | ||
headers: {} = {}, | ||
type: string = "scraper" | ||
) { | ||
super({ type, url, headers }); | ||
|
||
this.ep = new Scraper("https://graph.instagram.com", { | ||
headers: { Authorization: `Bearer ${headers.accessToken}` }, | ||
this.ep = new Scraper(url, { | ||
headers: { Authorization: `Bearer ${accessToken}` }, | ||
}); | ||
|
||
this.session = new InstagramSession( | ||
"instagram", | ||
headers.accessToken, | ||
this.ep | ||
); | ||
this.session = new InstagramSession("instagram", accessToken, this.ep); | ||
} | ||
} | ||
|
||
|