isaced / appstore-connect-sdk

A TypeScript module for Node.js that interacts with the App Store Connect API, providing support for all APIs based on OpenAPI specification.
MIT License
25 stars 7 forks source link

feat: allow specifying base path #18

Closed jozsefsallai closed 6 months ago

jozsefsallai commented 6 months ago

This PR adds a new option to the client configuration object called basePath which can be used to override the default path (https://api.appstoreconnect.apple.com) of the requests. This can be useful for testing purposes, since we can make the library point to an in-house mock server that uses dummy data/fixtures instead of making requests to the real API.

basePath is already a supported option in the runtime file generated by OpenAPI, the client just didn't allow the possibility to pass a different URL to it.

I also added unit tests to make sure this new behavior works as intended, as well as a new sub-section in the readme. I did not make changes to the Chinese readme.

isaced commented 6 months ago

Cool! @jozsefsallai