3c3 < index 0000000..f414dfb --- > index 0000000..492e4c3 6c6 < @@ -0,0 +1,145 @@ --- > @@ -0,0 +1,179 @@ 39,41c39,43 < + private $site = "http://drupal:drupal@project-drupal.redesign.devdrupal.org"; < + < + //private $site = "http://drupal.org"; --- > + //private $site = "http://drupal:drupal@project-drupal.redesign.devdrupal.org"; > + // As RestWS is configured to change the resources > + // through hook_restws_resource_info_alter() we need to add /api-d7 > + private $site = "https://drupal:drupal@restws-drupal.redesign.devdrupal.org/api-d7"; > + //private $site = "https://drupal.org/api-d7"; 53a56,60 > + /** > + * Fetches a set of nodes and their related resources. > + * > + * Note the list of issues changes depending on the $this->site used. > + */ 58c65 < + $nid_list = "2125253,2105915,2112705,2109287,2125717,2125633,2112151,2125731,2121283,2126047,2099239,2100073,2125497,2125955,2099391,2114165,2088365,2121519,2100571,2120461,2120505,2103155,2105617,2125043"; --- > + $nid_list = "2278541,2125253,2105915,2112705,2109287,2125717,2125633,2112151,2125731,2121283,2126047,2099239,2100073,2125497,2125955,2099391,2114165,2088365,2121519,2100571,2120461,2120505,2103155,2105617,2125043"; 83c90,92 < + print_r($store); --- > + $node->ALL_META_DATA = $store; > + print_r($node); > + echo json_encode($node, JSON_PRETTY_PRINT); 86a96,103 > + /** > + * Fetch and store resource as json. > + * > + * @param array &$store > + * In memory structure of all already fetched resources. > + * @param object $resource > + * A drupal.org RestWs result. > + */ 129a147,148 > + echo PHP_EOL . "FFFetching $uri" . PHP_EOL; > + 130a150 > + echo PHP_EOL . " $url" . PHP_EOL; 132c152 < + 'http' => array( --- > + 'https' => array( 136,137c156,163 < + "User-Agent: Drush\r\n" < + ) --- > + "User-Agent: Drush\r\n", > + ), > + // Is this the way to allow https invalid certificate? > + // current status: NO! > + 'ssl' => array( > + 'allow_self_signed' => TRUE, > + 'verify_peer' => FALSE, > + ), 145a172,179 > + /** > + * Generate the full URL to fetch the given $uri. > + * > + * Depending on the Rest endpoint this could end with .json > + * > + * @param string $uri > + * The resource URI given like node/12 or user/12 > + */ 147,148c181,182 < + //return $this->site . '/' . $uri . '.json'; < + return $this->site . '/' . $uri; --- > + return $this->site . '/' . $uri . '.json'; > + //return $this->site . '/' . $uri;