npr / nprapi-wordpress

Access the NPR API from within WordPress. This repository is no longer being maintained. See the README for more information.
GNU General Public License v2.0
13 stars 30 forks source link

switch to https urls in the DS_NPR_API class #44

Closed benlk closed 6 years ago

benlk commented 6 years ago

Changes

(edited)

Why

From the update document:

With NPR.org going HTTPS, following update needs to be made in the Story API plugin for querying Story content so NPR stories can be queried by HTTPS and HTTP URLs

For https://github.com/INN/WP-DS-NPR-API/issues/11

benlk commented 6 years ago

A question before merging: do any of these other references to insecure URLs need to be changed?

./classes/NPRAPI.php:  const NPRAPI_PULL_URL = 'http://api.npr.org';
./classes/NPRAPI.php:  const NPRML_NAMESPACE = 'xmlns:nprml=http://api.npr.org/nprml';
./classes/NPRAPIWordpress.php:   *   The path part of the request URL (i.e., http://example.com/PATH).
./ds-npr-api.php:   $def_url = 'http://api.npr.org';
./get_stories.php:                  if ( stristr( $query_string, 'http:' ) ) {
./settings_ui.php:       <div><p>Create an NPR API query (see the <a target="_" href="http://www.npr.org/api/queryGenerator.php">NPR API query generator</a>). Enter your queries into one of the rows below to have stories on that query automatically publish to your site. Please note, you do not need to include your API key to the query.  </div>
./tests/test-ds-npr-api.php:        $this->assertEquals( $option, 'http://api.npr.org' );
benlk commented 6 years ago
milespj commented 6 years ago

Hi Ben -

All of NPR's website links (including API calls) are generally now HTTPS. In fact if you find any that aren't HTTPS let me know! So, we should update all of the URL's to be HTTPS to eliminate unnecessary redirects.

benlk commented 6 years ago

Cool, I'll update this pull request with https urls for all the NPR links, where those links can be updated.

Of note:

milespj commented 6 years ago

Thanks for all of these documentation edits! Other than the one URL that was still marked as HTTP this looks good.

benlk commented 6 years ago

That must've happened when I merged https://github.com/npr/nprapi-wordpress/commit/f4032ce35af448a9800f6412884f483ca986819f into this branch; my bad. It's fixed now.

milespj commented 6 years ago

Just wanted to mention that I'm good with this pull request!