1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-31 22:00:23 +02:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
pauder
2015-01-05 11:56:38 +01:00
92 changed files with 6525 additions and 127 deletions

View File

@@ -2,9 +2,12 @@
/**
* RssBridgePinterest
* Returns the newest photos on a board
* 2014-05-25
*
* @name Pinterest Bridge
* @homepage http://www.pinterest.com/
* @description Returns the newest images on a board
* @maintainer pauder
* @use1(u="username",b="board")
* @use2(q="keyword")
*/
@@ -16,7 +19,18 @@ class PinterestBridge extends BridgeAbstract{
public function collectData(array $param){
$html = '';
if (isset($param['u']) && isset($param['b'])) {
if (isset($param['u']) || isset($param['b'])) {
if (empty($param['u']))
{
$this->returnError('You must specify a Pinterest username (?u=...).', 400);
}
if (empty($param['b']))
{
$this->returnError('You must specify a Pinterest board for this username (?b=...).', 400);
}
$this->username = $param['u'];
$this->board = $param['b'];
$html = file_get_html($this->getURI().'/'.urlencode($this->username).'/'.urlencode($this->board)) or $this->returnError('Could not request Pinterest.', 404);