File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -124,27 +124,24 @@ class InstagramClient extends Client {
124124 *
125125 * @constructor
126126 * @author Nico Schett <contact@schett.net>
127- * @param url The base URL the GithubClient should be working on.
128- * Default: "https://api.github .com/graphql".
127+ * @param url The base URL the InstagramClient should be working on.
128+ * Default: "https://graph.instagram .com"
129129 * @param headers A object containing various request headers
130130 * @param type A type description to differ between multiple instances
131131 */
132132 constructor (
133- url : string = "https://api.github.com/graphql" ,
134- headers : { accessToken : string } ,
133+ accessToken : string ,
134+ url : string = "https://graph.instagram.com" ,
135+ headers : { } = { } ,
135136 type : string = "scraper"
136137 ) {
137138 super ( { type, url, headers } ) ;
138139
139- this . ep = new Scraper ( "https://graph.instagram.com" , {
140- headers : { Authorization : `Bearer ${ headers . accessToken } ` } ,
140+ this . ep = new Scraper ( url , {
141+ headers : { Authorization : `Bearer ${ accessToken } ` } ,
141142 } ) ;
142143
143- this . session = new InstagramSession (
144- "instagram" ,
145- headers . accessToken ,
146- this . ep
147- ) ;
144+ this . session = new InstagramSession ( "instagram" , accessToken , this . ep ) ;
148145 }
149146}
150147
You can’t perform that action at this time.
0 commit comments