Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwinchester committed May 20, 2015
1 parent 6ebb73b commit a0b15e9
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 100 deletions.
Empty file modified .gitignore 100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -188,4 +188,4 @@ Apache License
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
Empty file modified README.md 100755 → 100644
Empty file.
Empty file modified composer.json 100755 → 100644
Empty file.
1 change: 0 additions & 1 deletion src/Api/Api.php
@@ -1,7 +1,6 @@
<?php namespace Fungku\HubSpot\Api;

use Fungku\HubSpot\Contracts\HttpClient;
use Fungku\HubSpot\Exceptions\HubSpotException;
use Fungku\HubSpot\Http\Query;
use GuzzleHttp\Exception\RequestException;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/BlogPosts.php
Expand Up @@ -14,7 +14,7 @@ public function create($params)

$options['json'] = $params;

return $this->request('post', $endpoint, $params);
return $this->request('post', $endpoint, $options);
}

/**
Expand All @@ -29,7 +29,7 @@ public function all($params)

$options['query'] = $this->getQuery($params);

return $this->request('get', $endpoint, $params);
return $this->request('get', $endpoint, $options);
}

/**
Expand Down
61 changes: 1 addition & 60 deletions src/Api/MarketPlace.php
Expand Up @@ -2,64 +2,5 @@

class MarketPlace extends Api
{
/**
* Get all blogs.
*
* @param array $params Optional parameters ['limit', 'offset', 'created', 'deleted_at', 'name']
* @return mixed
*/
public function all($params)
{
$endpoint = '/content/api/v2/blogs';

$options['query'] = $this->getQuery($params);

return $this->request('get', $endpoint, $options);
}

/**
* Get information about a specific blog.
*
* @param string $id
* @return mixed
*/
public function getById($id)
{
$endpoint = "/content/api/v2/blogs/{$id}";

return $this->request('get', $endpoint);
}

/**
* Get previous versions of the blog.
*
* @param string $id Blog id.
* @param array $params Optional parameters.
* @return mixed
*/
public function versions($id, $params)
{
$endpoint = "/content/api/v2/blogs/{$id}/versions";

$options['query'] = $this->getQuery($params);

return $this->request('get', $endpoint, $options);
}

/**
* Get a previous version of the blog.
*
* @param string $id Blog id.
* @param string $version_id Version id.
* @param array $params Optional parameters.
* @return mixed
*/
public function getVersionById($id, $version_id, $params)
{
$endpoint = "/content/api/v2/blogs/{$id}/versions/{$version_id}";

$options['query'] = $this->getQuery($params);

return $this->request('get', $endpoint, $options);
}
//
}
4 changes: 2 additions & 2 deletions src/Api/Pages.php
Expand Up @@ -14,7 +14,7 @@ public function create($params)

$options['json'] = $params;

return $this->request('post', $endpoint, $params);
return $this->request('post', $endpoint, $options);
}

/**
Expand All @@ -29,7 +29,7 @@ public function all($params)

$options['query'] = $this->getQuery($params);

return $this->request('get', $endpoint, $params);
return $this->request('get', $endpoint, $options);
}

/**
Expand Down
29 changes: 0 additions & 29 deletions src/Api/helpers.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Contracts/ApiResponse.php
Expand Up @@ -54,4 +54,4 @@ public function json();
* @link http://websec.io/2012/08/27/Preventing-XXE-in-PHP.html
*/
public function xml();
}
}
2 changes: 1 addition & 1 deletion src/Contracts/HttpQuery.php
Expand Up @@ -81,4 +81,4 @@ public static function phpAggregator($numericIndices = true);
* @return array
*/
public static function walkQuery(array $query, $keyPrefix, callable $prefixer);
}
}
Empty file modified src/Exceptions/HubSpotException.php 100755 → 100644
Empty file.
2 changes: 0 additions & 2 deletions src/Http/Client.php
@@ -1,7 +1,6 @@
<?php namespace Fungku\HubSpot\Http;

use Fungku\HubSpot\Contracts\HttpClient;
use Fungku\HubSpot\Http\Response;
use GuzzleHttp\Client as GuzzleClient;

class Client implements HttpClient
Expand All @@ -26,7 +25,6 @@ public function __construct()
*/
public function get($url, array $options = [])
{
//return new Response($this->client->get($url, $options));
return $this->client->get($url, $options)->json();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Query.php
Expand Up @@ -6,4 +6,4 @@
class Query extends GuzzleQuery implements HttpQuery
{
//
}
}
Empty file modified src/HubSpotService.php 100755 → 100644
Empty file.

0 comments on commit a0b15e9

Please sign in to comment.