Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Merge branch 'release/1.1.8'
Browse files Browse the repository at this point in the history
* release/1.1.8:
  Updated `CHANGELOG.md` and generated documentation
  Fix for broken tests
  Added docblock
  StyleCI fix
  Fixes #14
  Fix for StyleCI
  Added `Http\UrlParserTrait`, moved methods from `SecureRequestMiddleware` and updated tests.
  • Loading branch information
hassankhan committed Mar 16, 2016
2 parents e8600c4 + 9e7af9b commit 535f930
Show file tree
Hide file tree
Showing 44 changed files with 557 additions and 415 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
### Security
- Nothing

## 1.1.8 - 2016-03-16

### Added
- Created `Http\UrlParserTrait` and moved methods `SecureRequestMiddleware::getPath()` and `SecureRequestMiddleware::getParams()` to it.

### Fixed
- Changed namespace `Entities` to `Repositories`.

## 1.1.7 - 2016-03-15

### Fixed
Expand Down
24 changes: 12 additions & 12 deletions docs/Larabros/Elogram/Client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,39 +38,39 @@ Larabros\\Elogram\\Client

.. php:method:: users()
Returns the current instance of :php:class:`User`.
Returns the current instance of :php:class:`UsersRepository`.

:returns: User
:returns: UsersRepository

.. php:method:: media()
Returns the current instance of :php:class:`Media`.
Returns the current instance of :php:class:`MediaRepository`.

:returns: Media
:returns: MediaRepository

.. php:method:: comments()
Returns the current instance of :php:class:`Comment`.
Returns the current instance of :php:class:`CommentsRepository`.

:returns: Comment
:returns: CommentsRepository

.. php:method:: likes()
Returns the current instance of :php:class:`LikeRepository`.
Returns the current instance of :php:class:`LikesRepository`.

:returns: LikeRepository
:returns: LikesRepository

.. php:method:: tags()
Returns the current instance of :php:class:`Tag`.
Returns the current instance of :php:class:`TagsRepository`.

:returns: Tag
:returns: TagsRepository

.. php:method:: locations()
Returns the current instance of :php:class:`Location`.
Returns the current instance of :php:class:`LocationsRepository`.

:returns: Location
:returns: LocationsRepository

.. php:method:: request($method, $uri, $parameters = [])
Expand Down
20 changes: 0 additions & 20 deletions docs/Larabros/Elogram/Entities/AbstractEntity.rst

This file was deleted.

15 changes: 0 additions & 15 deletions docs/Larabros/Elogram/Entities/index.rst

This file was deleted.

6 changes: 3 additions & 3 deletions docs/Larabros/Elogram/Helpers/RedirectLoginHelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Larabros\\Elogram\\Helpers\\RedirectLoginHelper

.. php:attr:: provider
protected ProviderInterface
protected AdapterInterface

.. php:attr:: store
protected DataStoreInterface

.. php:method:: __construct(ProviderInterface $provider, DataStoreInterface $store)
.. php:method:: __construct(AdapterInterface $provider, DataStoreInterface $store)
Creates an instance of :php:class:`RedirectLoginHelper`.

:type $provider: ProviderInterface
:type $provider: AdapterInterface
:param $provider:
:type $store: DataStoreInterface
:param $store:
Expand Down
32 changes: 24 additions & 8 deletions docs/Larabros/Elogram/Http/Middleware/SecureRequestMiddleware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,14 @@ Larabros\\Elogram\\Http\\Middleware\\SecureRequestMiddleware
:param $request:
:param $options:

.. php:method:: getPath($path)
:param $path:

.. php:method:: getParams($query)
:param $query:

.. php:method:: generateSig($endpoint, $params, $secret)
Generates a ``sig`` value for a request.

:param $endpoint:
:param $params:
:param $secret:
:returns: string

.. php:method:: create(ConfigInterface $config)
Expand All @@ -50,6 +45,27 @@ Larabros\\Elogram\\Http\\Middleware\\SecureRequestMiddleware
:param $config:
:returns: Closure

.. php:method:: getPath(UriInterface $uri)
Gets the path from a ``UriInterface`` instance after removing the version
prefix.

:type $uri: UriInterface
:param $uri:
:returns: string

.. php:method:: getQueryParams(UriInterface $uri, $exclude = ['sig'], $params = [])
Gets the query parameters as an array from a ``UriInterface`` instance.

:type $uri: UriInterface
:param $uri:
:type $exclude: array
:param $exclude:
:type $params: array
:param $params:
:returns: array

.. php:method:: __construct($nextHandler, ConfigInterface $config)
Creates an instance of :php:class:`AbstractMiddleware`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
--------------------------------------------------
Larabros\\Elogram\\Http\\OAuth2\\ProviderInterface
--------------------------------------------------
------------------------------------------------------------
Larabros\\Elogram\\Http\\OAuth2\\Providers\\AdapterInterface
------------------------------------------------------------

.. php:namespace: Larabros\\Elogram\\Http\\OAuth2
.. php:namespace: Larabros\\Elogram\\Http\\OAuth2\\Providers
.. php:interface:: ProviderInterface
.. php:interface:: AdapterInterface
An interface for OAuth2 providers.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-----------------------------------------------
Larabros\\Elogram\\Http\\OAuth2\\LeagueProvider
-----------------------------------------------
---------------------------------------------------------
Larabros\\Elogram\\Http\\OAuth2\\Providers\\LeagueAdapter
---------------------------------------------------------

.. php:namespace: Larabros\\Elogram\\Http\\OAuth2
.. php:namespace: Larabros\\Elogram\\Http\\OAuth2\\Providers
.. php:class:: LeagueProvider
.. php:class:: LeagueAdapter
An OAuth2 provider for the League OAuth2 package.
An OAuth2 provider for the League Instagram OAuth2 package.

.. php:method:: getAuthorizationUrl($options = [])
Expand Down
10 changes: 10 additions & 0 deletions docs/Larabros/Elogram/Http/OAuth2/Providers/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Larabros\\Elogram\\Http\\OAuth2\\Providers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. php:namespace: Larabros\\Elogram\\Http\\OAuth2\\Providers
.. toctree::

AdapterInterface
LeagueAdapter
10 changes: 0 additions & 10 deletions docs/Larabros/Elogram/Http/OAuth2/index.rst

This file was deleted.

30 changes: 30 additions & 0 deletions docs/Larabros/Elogram/Http/UrlParserTrait.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---------------------------------------
Larabros\\Elogram\\Http\\UrlParserTrait
---------------------------------------

.. php:namespace: Larabros\\Elogram\\Http
.. php:trait:: UrlParserTrait
Adds utility classes for parsing parts of a URL.

.. php:method:: getPath(UriInterface $uri)
Gets the path from a ``UriInterface`` instance after removing the version
prefix.

:type $uri: UriInterface
:param $uri:
:returns: string

.. php:method:: getQueryParams(UriInterface $uri, $exclude = ['sig'], $params = [])
Gets the query parameters as an array from a ``UriInterface`` instance.

:type $uri: UriInterface
:param $uri:
:type $exclude: array
:param $exclude:
:type $params: array
:param $params:
:returns: array
1 change: 1 addition & 0 deletions docs/Larabros/Elogram/Http/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Larabros\\Elogram\\Http
OAuth2/index
Response
Sessions/index
UrlParserTrait
20 changes: 20 additions & 0 deletions docs/Larabros/Elogram/Repositories/AbstractRepository.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---------------------------------------------------
Larabros\\Elogram\\Repositories\\AbstractRepository
---------------------------------------------------

.. php:namespace: Larabros\\Elogram\\Repositories
.. php:class:: AbstractRepository
An abstract repository class. Any new endpoints should extend this class.

.. php:attr:: client
protected AdapterInterface

.. php:method:: __construct(AdapterInterface $client)
Creates a new instance of :php:class:`AbstractRepository`.

:type $client: AdapterInterface
:param $client:
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
------------------------------------
Larabros\\Elogram\\Entities\\Comment
------------------------------------
---------------------------------------------------
Larabros\\Elogram\\Repositories\\CommentsRepository
---------------------------------------------------

.. php:namespace: Larabros\\Elogram\\Entities
.. php:namespace: Larabros\\Elogram\\Repositories
.. php:class:: Comment
.. php:class:: CommentsRepository
Comment
CommentsRepository

.. php:attr:: client
Expand All @@ -31,7 +31,7 @@ Larabros\\Elogram\\Entities\\Comment

:param $mediaId:
:type $text: string
:param $text: Text to post as a comment on the media object as specified by `$mediaId`
:param $text: Text to post as a comment on the media object
:returns: Response

.. php:method:: delete($mediaId, $commentId)
Expand All @@ -46,7 +46,7 @@ Larabros\\Elogram\\Entities\\Comment

.. php:method:: __construct(AdapterInterface $client)
Creates a new instance of :php:class:`AbstractEntity`.
Creates a new instance of :php:class:`AbstractRepository`.

:type $client: AdapterInterface
:param $client:
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-------------------------------------------
Larabros\\Elogram\\Entities\\LikeRepository
-------------------------------------------
------------------------------------------------
Larabros\\Elogram\\Repositories\\LikesRepository
------------------------------------------------

.. php:namespace: Larabros\\Elogram\\Entities
.. php:namespace: Larabros\\Elogram\\Repositories
.. php:class:: LikeRepository
.. php:class:: LikesRepository
LikeRepository class.
LikesRepository class.

.. php:attr:: client
Expand Down Expand Up @@ -38,7 +38,7 @@ Larabros\\Elogram\\Entities\\LikeRepository

.. php:method:: __construct(AdapterInterface $client)
Creates a new instance of :php:class:`AbstractEntity`.
Creates a new instance of :php:class:`AbstractRepository`.

:type $client: AdapterInterface
:param $client:
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-------------------------------------
Larabros\\Elogram\\Entities\\Location
-------------------------------------
----------------------------------------------------
Larabros\\Elogram\\Repositories\\LocationsRepository
----------------------------------------------------

.. php:namespace: Larabros\\Elogram\\Entities
.. php:namespace: Larabros\\Elogram\\Repositories
.. php:class:: Location
.. php:class:: LocationsRepository
Location
LocationsRepository

.. php:attr:: client
Expand Down Expand Up @@ -61,7 +61,7 @@ Larabros\\Elogram\\Entities\\Location
.. php:method:: __construct(AdapterInterface $client)
Creates a new instance of :php:class:`AbstractEntity`.
Creates a new instance of :php:class:`AbstractRepository`.
:type $client: AdapterInterface
:param $client:
Loading

0 comments on commit 535f930

Please sign in to comment.