Code Monkey home page Code Monkey logo

Comments (8)

edouardr avatar edouardr commented on June 23, 2024

The urls for delivery and preview API are set in the QueryService class as private readonly attributs.

What about exposing them in the DeliveryClientConfig class? QueryService is already instantiated with the config object.

from delivery-sdk-js.

sesigl avatar sesigl commented on June 23, 2024

Sounds Good for me. Looking forward to an implementation and documentation ;).

from delivery-sdk-js.

petrsvihlik avatar petrsvihlik commented on June 23, 2024

See how it's implemented in the .net sdk for reference.

from delivery-sdk-js.

sesigl avatar sesigl commented on June 23, 2024

alright, so what do you mean by that? Do you ask me to contribute ? Or will you do/delegate it?

I'm open minded in this case :).

from delivery-sdk-js.

petrsvihlik avatar petrsvihlik commented on June 23, 2024

@Journerist sorry for confusion, it was rather a generic remark, not addressed to anyone in particular :)

It would be great if you could take care of it.

So what we did in the .NET SDK is that we introduced a DeliveryOptions object, adjusted DeliveryClient's constructors. And here's an example of how it can be used: https://github.com/Kentico/delivery-sdk-net/wiki/Using-the-ASP.NET-Core-Configuration-API-and-DI-to-Instantiate-the-DeliveryClient.

I'm not saying we should do it the exactly same thing but the general look&feel should be somewhat similar :)

Please let us know if you're willing to contribute so that we can assign the issue to you.

from delivery-sdk-js.

Enngage avatar Enngage commented on June 23, 2024

Hey guys,

This is a good idea. I implemented it so that you can specify base urls when instantiating DeliveryClientConfig. I published it in 2.1.2 release:

new DeliveryClientConfig('projectId', [], {
      baseUrl: 'http://customurl.com',
      basePreviewUrl: 'http://custompreview.com'
    });

Let me know how that works and if you have any further suggestions.

from delivery-sdk-js.

sesigl avatar sesigl commented on June 23, 2024

@Enngage thank you, this is awesome. I'll try it this evening and give you feedback if this works for me.

from delivery-sdk-js.

sesigl avatar sesigl commented on June 23, 2024

I already love it, works amazingly. Finally I can get rid of my ugly hack :P. Thanks a lot ! <3

from delivery-sdk-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.