GithubHelp home page GithubHelp logo

Comments (5)

yfaktor avatar yfaktor commented on August 20, 2024

I think this is a dup of #7 - would you agree? Thanks

from hubspot-api-php.

alexanderschnitzler avatar alexanderschnitzler commented on August 20, 2024

I don't fully understand the authors intent but it does not seem to be the same request. To me the issue mentioned in #7 sounds like a static json file which the objects are created from whereas I am talking about the individual json returned from your api which is not accessible when using your client because your client created objects and does not expose the response object which holds the json.

from hubspot-api-php.

yfaktor avatar yfaktor commented on August 20, 2024

@alexanderschnitzler - sorry I misunderstood the request here.
@atanasiuk-hubspot - would calling ObjectSerializer::sanitizeForSerialization() work for converting an Object back to Json?

from hubspot-api-php.

atanasiuk-hubspot avatar atanasiuk-hubspot commented on August 20, 2024

It would be great to have an extra method (like all the async methods) that directly return the response and don't process it any further.

Unfortunately, the client generated with OpenAPI tool, doesn't currently expose the original Json response, so no way to get it directly.

As a workaround the response object can be casted to Json string manually:

$apiResponse = $hubspot->crm()->contacts()->defaultApi()->getPage();
$jsonString = (string)$apiResponse;

And, yes, casting to "string" will use ObjectSerializer::sanitizeForSerialization method under the hood, as @yfaktor mentioned.

from hubspot-api-php.

yfaktor avatar yfaktor commented on August 20, 2024

closing this because workaround was provided, but please reopen it if it doesn't work, thank you

from hubspot-api-php.

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.