Skip to content

Commit

Permalink
Merge pull request traderinteractive#26 from rydente/v0.x
Browse files Browse the repository at this point in the history
Create response interface
  • Loading branch information
chadicus committed Nov 10, 2016
2 parents b1c7707 + 273221d commit 98b9e2b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Represents a response to an API request
*/
final class Response
implements ResponseInterface
{
/**
* The http status of the response.
Expand Down
30 changes: 30 additions & 0 deletions src/ResponseInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

namespace DominionEnterprises\Api;

/**
* Represents a response to an API request
*/
interface ResponseInterface
{
/**
* Returns the HTTP status code of the response
*
* @return int
*/
function getHttpCode();

/**
* Returns an array representing the response from the API
*
* @return array
*/
function getResponse();

/**
* Returns the parsed response headers from the API
*
* @return array array where each header key has an array of values
*/
function getResponseHeaders();
}

0 comments on commit 98b9e2b

Please sign in to comment.