Skip to content

Commit

Permalink
Merge pull request #236 from rusan/master
Browse files Browse the repository at this point in the history
Save query ids in special file
  • Loading branch information
raiym authored Dec 12, 2017
2 parents 3574393 + 041079c commit 6e22178
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/InstagramScraper/Endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ class Endpoints

const GRAPH_QL_QUERY_URL = 'https://www.instagram.com/graphql/query/?query_id={{queryId}}';

//stories use GRAPH_QL_QUERY_URL
const USER_STORIES_QUERY_ID = '17890626976041463';
const STORIES_QUERY_ID = '17873473675158481';


public static function getAccountPageLink($username)
{
return str_replace('{username}', urlencode($username), static::ACCOUNT_PAGE);
Expand Down Expand Up @@ -155,13 +150,13 @@ public static function getFollowingJsonLink($accountId, $count, $after = '')

public static function getUserStoriesLink()
{
$url = self::getGraphQlUrl(static::USER_STORIES_QUERY_ID, ['variables' => json_encode([])]);
$url = self::getGraphQlUrl(InstagramQueryId::USER_STORIES, ['variables' => json_encode([])]);
return $url;
}

public static function getStoriesLink($variables)
{
$url = self::getGraphQlUrl(static::STORIES_QUERY_ID, ['variables' => json_encode($variables)]);
$url = self::getGraphQlUrl(InstagramQueryId::STORIES, ['variables' => json_encode($variables)]);
return $url;
}
}
2 changes: 2 additions & 0 deletions src/InstagramScraper/InstagramQueryId.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ class InstagramQueryId
* id = {{accoundId}}, first = {{count}}, after = {{mediaId}}
*/
const USER_MEDIAS = '17880160963012870';
const USER_STORIES = '17890626976041463';
const STORIES = '17873473675158481';

}

0 comments on commit 6e22178

Please sign in to comment.