- Changes namespace to Gnikyt
- Changes return type of iterable to match signature of iterable for PHP 8.1 (#129)
- Bugfix to rate limiter (#123)
- Bugfix to rate limiter (#120)
- Moved
final
flag to the constructor
- Added
final
flag toResponseAccess
class - CI improvements
- Fix for Graph API limit calls not accessing the correct index for last call data
- Update for microtime for rate limiter
- Bump Guzzle to version 8 from 7 (#83)
- Implemented toArray method, mainly used for Laravel integration
- Fix to allow for overriding request type for data (#80)
- Oauth error handling (#77).
- Implemented
Iterable
andCountable
onResponseAccess
- Added methods
keys
andvalues
to allow for getting keys and values easier - Add JSON serilize method
- Rate limiting for REST has been improved to use a moving window method
Sleep
deferrer now returns a float for the time microtimeMemory
store now has areset
method to support the new rate limitingMemory
now accepts more then two values to support the new rate limiting
Contains breaking changes; Consult UPGRADING.md
.
- Library refactored and split up, no longer one file
- Auth header handling moved into Guzzle middleware
- API versioning handler moved into Guzzle middleware
- Rate limiting improved and now available for GraphQL
- Options moved into its own configuration class
- "Retry" ability now built-in via
guzzle_retry_middleware
which respects Shopify's 'X-Retry-After' header - API responses are now mapped into a response class which can be accessed as an array or object
- Storage of how/where rate limits, request times, and others are now changable with the
StateStorage
interface, and a default in-memory storage class provided - Both GraphQL and REST success and error returns have been normalized
- Added
bodyArray
to response object of rest and graph, this is the same asbody
except instead of a stdClass being returned, its an array.
- Added response to error callback function (#64)
- Allow for additional client creation options (#65)
- Added return types to all functions.
- Added async support for GraphQL via
graphAsync
. - Added support for call to
/admin/oauth/access_scopes.json
.
- Fix for REST calls not properly building error object (#47).
- Fixed
extractHeaderLink
for #45, to include bothnext
andprevious
.
- Adds support for
Link
header (#39)
- Added ability to do Guzzle sync and async requests through Promises.
errors
now returns a boolean instead of an object.body
now contains the error response.
- Added ability to use custom headers in REST calls.
- Added option to supply a PSR-compatible logger via
setLogger
.
- Added matching to ignore certain oauth paths.
- Added for for issue #24 in detection of what an authable request is.
- Fixed merged in to prevent versioning on access token calls.
- Added support for versioned API calls for both REST and GraphAPI
- New
setVersion(string $version)
method added, and newgetVersion()
method added
- Added ability for
per-user
authentication. There is now ability to set/grab a user from authentication. requestAndSetAccess(string $code)
method added which will automatically set the access token and user (if applicable) to the API instance for you as a helper method.
- Added a
authRequest
middleware to Guzzle which handles adding all needed headers and checking required API keys to run those requests - Fixed issue for redirect not working
Possible breaking release depending on how you handle errors
- 400-500 errors are now captured internally and accessible through the resulting object (#16)
- Middleware was added to the Guzzle requests to fix redirections (#16)
- Changes to the response of GraphQL calls to better check for errors.
- Update for more accurate timing
- Added rate limiting abilities (basic)
- Fix for #13 for requests where call limit header is not always supplied
- Adjusted API to work better with Shopify's implementation of GraphQL (#10)
graph()
call now accepts two arguments,graph(string $query, array $variables = [])
- Fix to obtaining access token
Contains breaking changes
To better the library, it has been reverted back to its original single-class form and backwards compatibile with 1.x.x
- GraphQL and REST are all under one class
getApiCalls()
now takes two arguments, first being rest|graph, second being the keyrest()
is now for REST callsgraph()
is now for GraphQL callsrequest()
is aliased torest()
for backward compatibility
Contains breaking changes
- No longer a single file, it now namespaced under
OhmyBrew\ShopifyAPI
- GraphQL is now introduced under
Gnikyt\ShopifyAPI\GraphAPI
- REST is moved to
Gnikyt\ShopifyAPI\RestAPI
- Fixed issue #3 by @ncpope, for newly created stores (after December 2017) not accepting GET body
- Basic API code implemented
- Tests completed with full coverage