ZEROSPAM\Framework\SDK\Request\Api\BaseRequest
Class BaseRequest
Represent a base request that will be sent to the API Server
Synopsis
- // members
- private array $arguments = ;
- private array $mergeableArguments = ;
- private array $stackableArguments = ;
- private IResponse $response;
- private integer $tries = 0;
- private RequestType $requestTypeOverride;
- // methods
- public IRequest addArgument()
- public IRequest removeArgument()
- public array getArguments()
- public array toArray()
- protected array blacklistedProperties()
- public UriInterface toUri()
- public final RequestType requestType()
- public array requestOptions()
- public IResponse getResponse()
- public void setResponse()
- public int tries()
- public int incrementTries()
- public array getMergeableArguments()
- private string generateUrl()
Hierarchy
Implements
Members
private
- $arguments — array
- $mergeableArguments — array
- $requestTypeOverride — ZEROSPAM\Framework\SDK\Request\Type\RequestType
- $response — \ZEROSPAM\Framework\SDK\Response\Api\IResponse
- $stackableArguments — array
- $tries — int
Methods
private
- generateUrl() — Generate the URL
protected
- blacklistedProperties() — List of properties to not serialize.
public
- addArgument() — Add a request argument.
- getArguments() — Get all the request arguments.
- getMergeableArguments()
- getResponse() — Getter for response.
- incrementTries() — Increment the number of tries and returns it.
- removeArgument() — Remove a request argument.
- requestOptions() — Options for this request to be used by the client.
- requestType() — Request type to use for the request.
- setResponse()
- toArray() — Get the data used for the route.
- toUri() — Return the URI of the request.
- tries() — Number of tries of the request.
History
-
2018-11-07T16:53:28+00:00 (commit #80a6915)
Author: Antoine Aflalo (antoine.aflalo@zerospam.ca) / Commiter: Antoine Aflalo (antoine.aflalo@zerospam.ca)
fix(EmptyRequest): Don't have a body for GET requests Don't serialize STATIC properties of requests.
-
2018-09-25T17:35:19+00:00 (commit #b209b48)
Author: Antoine Aflalo (antoine.aflalo@zerospam.ca) / Commiter: Antoine Aflalo (antoine.aflalo@zerospam.ca)
perf(Arguments): Refactor the way the arguments works To be sure we can work with SubKeyedArg that are having array as value.
-
2018-09-25T14:35:41+00:00 (commit #0efa70c)
Author: Philippe Bouchard-Bourdeau (pbb@zerospam.ca) / Commiter: Philippe Bouchard-Bourdeau (pbb@zerospam.ca)
feat(Arguments): Added Array Stackable argument Needed that to match IN filters of freshbooks queries They using non standard query params with the following format: ?search[statusids][]=1&search[statusids][]=2
-
2018-09-18T14:42:14+00:00 (commit #a7b47f3)
Author: Antoine Aflalo (antoine.aflalo@zerospam.ca) / Commiter: Antoine Aflalo (antoine.aflalo@zerospam.ca)
fix(StackableArg): Fix how the stackable argument are generated Example: Include => ['test', 'test2'] -> include[0]=test&include[1]=test2 Now: Include => ['test', 'test2'] -> include[]=test&include[]=test2
-
2018-07-16T14:26:38+00:00 (commit #290a97d)
Author: Antoine Aflalo (antoine.aflalo@zerospam.ca) / Commiter: Antoine Aflalo (antoine.aflalo@zerospam.ca)
feat(Response): Split Ratelimited from BaseResponse New type of response can now be easily build.