Closed ahmetoz closed 2 years ago
Because we didn't added a project scoped apiRoot yet like for the other SDKs. :)
But it's fine to do something like
const projectApiRoot = apiRoot.withProjectKey(projectKey)
and then use the projectApiRoot instead
Because we didn't added a project scoped apiRoot yet like for the other SDKs. :)
Thanks for the prompt answer. I think I did not got the idea here, can you elaborate a bit, what is project scoped apiRoot ? 🙏🏽
The ApiRoot is generated and the entry point is always on the root directory level.
For the other SDKs we added a manually maintained ApiRoot which is scoped to the project key. E.g. the Java SDK one:
ClientBuilder
has to have the projectKey to create a ctpClient, but when I create an apiRoot with usingcreateApiBuilderFromCtpClient(ctpClient)
, I did not understand why do we need to pass the projectKey everytime, is not the apiRoot bound this ctpClient already 🤔 It's a bit confusing tbh. I just wonder if you have an alternative use case to explain the need.