Giter Club home page Giter Club logo

Comments (3)

therve avatar therve commented on May 28, 2024

Thanks for you request, clarified what I understood. You can have multiple clients, just not to different server sites indeed. It seems like an oversight, we'll have a look.

from datadog-api-client-typescript.

haggholm avatar haggholm commented on May 28, 2024

After some digging, it looks like you can actually do this with the API as it is by passing in a baseServer parameter when creating a configuration:

    const configuration = v1.createConfiguration({
      authMethods: { apiKeyAuth: apiKey },
      baseServer: new v1.ServerConfiguration("https://{subdomain}.{site}", {
        site,
        subdomain: "api",
      }),
    });

The main problem here might be documentation: your documentation tells the user to set a global value and doesn't mention the fact that you can do it locally. Assuming that the above is correct, that is!

If I were to ask any further improvement of this as a feature, it would be nice not to have to pass in values like "https://{subdomain}.{site}", which is pretty cryptic, or having to specify the subdomain; if createConfiguration() could accept variableConfiguration parameters like {site} and use them to override defaults, it would be a lot easier to read (and perhaps more robust to library changes in the future).

from datadog-api-client-typescript.

therve avatar therve commented on May 28, 2024

baseServer works for some usecases, but not for other (namely ip-ranges and logs intake).

from datadog-api-client-typescript.

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.