Skip to content
This repository has been archived by the owner on Feb 4, 2019. It is now read-only.

Commit

Permalink
Fix php api examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
dashohoxha committed Jul 28, 2016
1 parent 4815c42 commit 39ff0a1
Show file tree
Hide file tree
Showing 29 changed files with 119 additions and 5,816 deletions.
2 changes: 1 addition & 1 deletion modules/custom/qtrServices/examples/php/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

define('DEBUG', TRUE);

$base_url = 'http://dev.qtranslate.org';
$base_url = 'https://dev.qtranslate.org';

$auth = array(
'token_url' => $base_url . '/oauth2/token',
Expand Down
19 changes: 0 additions & 19 deletions modules/custom/qtrServices/examples/php/misc/autocomplete.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
include_once($path . '/config.php');
include_once($path . '/http_request.php');

// GET project/list/all
http_request($base_url . '/project/list/all');
// Autocomplete strings.
http_request('https://dev.qtranslate.org/auto/user/en/u');
4 changes: 1 addition & 3 deletions modules/custom/qtrServices/examples/php/misc/latest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
include_once($path . '/http_request.php');

// Get the latest translations as a list in JSON format.
http_request('https://qtranslate.org/latest/sq');
//http_request('https://qtranslate.org/latest/sq/KDE');
//http_request('https://qtranslate.org/latest/sq/KDE/kdeedu');
http_request('https://qtranslate.org/latest/en');
12 changes: 2 additions & 10 deletions modules/custom/qtrServices/examples/php/misc/rss-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,5 @@ function link_to($url) {
print "<br/><hr/><br/>\n";

// Get a RSS feed of the latest translations.
link_to('https://sq.qtranslate.net/qtr/rss-feed');
link_to('https://sq.qtranslate.net/qtr/rss-feed/LibreOffice');
link_to('https://sq.qtranslate.net/qtr/rss-feed/LibreOffice/cui');

link_to('https://qtranslate.net/qtr/rss-feed/LibreOffice/cui/sq');
link_to('https://qtranslate.net/qtr/rss-feed/LibreOffice/cui');

link_to('https://qtranslate.org/rss-feed/sq');
link_to('https://qtranslate.org/rss-feed/sq/LibreOffice');
link_to('https://qtranslate.org/rss-feed/sq/LibreOffice/cui');
link_to('https://qtranslate.net/qtr/rss-feed/en');
link_to('https://qtranslate.org/rss-feed/en');
17 changes: 17 additions & 0 deletions modules/custom/qtrServices/examples/php/misc/tweet.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
$path = dirname(dirname(__FILE__));
include_once($path . '/config.php');
include_once($path . '/http_request.php');

function link_to($url) {
print("<li>Click: <a href='$url' target='_blank'>$url</a></li>");
};

print "<br/><hr/><br/>\n";

// Get a random translation.
link_to('https://qtranslate.org/tweet/en');
link_to('https://qtranslate.net/qtr/tweet/en');

http_request('https://qtranslate.org/tweet/en',
['headers' => ['Accept' => 'application/json']]);
22 changes: 0 additions & 22 deletions modules/custom/qtrServices/examples/php/misc/twitter.php

This file was deleted.

27 changes: 0 additions & 27 deletions modules/custom/qtrServices/examples/php/project/delete.php

This file was deleted.

24 changes: 0 additions & 24 deletions modules/custom/qtrServices/examples/php/project/export.php

This file was deleted.

46 changes: 0 additions & 46 deletions modules/custom/qtrServices/examples/php/project/import.php

This file was deleted.

27 changes: 0 additions & 27 deletions modules/custom/qtrServices/examples/php/project/list.php

This file was deleted.

Loading

0 comments on commit 39ff0a1

Please sign in to comment.