Shopify / shopify-api-php

MIT License
391 stars 175 forks source link

cannot get response as the documentations #340

Closed chuyenim closed 3 months ago

chuyenim commented 6 months ago

Issue summary

Write a short description of the issue here ↓ I see this note at the end of each example: "// do something with the returned data" However I cannot see any docs to return data!!!

Expected behavior

What do you think should happen? I want to see the docs to get response data.

Actual behavior

What actually happens? Shopify\Clients\HttpResponse Object ( [requestId:Shopify\Clients\HttpResponse:private] => 2dd1cc4f-9d5c-4c10-90a1-5244b4e39453-1713940962 [reasonPhrase:GuzzleHttp\Psr7\Response:private] => OK [statusCode:GuzzleHttp\Psr7\Response:private] => 200 [headers:GuzzleHttp\Psr7\Response:private] => Array ( [Date] => Array ( [0] => Wed, 24 Apr 2024 06:42:42 GMT )

        [Content-Type] => Array
            (
                [0] => application/json; charset=utf-8
            )

        [Transfer-Encoding] => Array
            (
                [0] => chunked
            )

        [Connection] => Array
            (
                [0] => keep-alive
            )

        [X-Sorting-Hat-PodId] => Array
            (
                [0] => 131
            )

        [X-Sorting-Hat-ShopId] => Array
            (
                [0] => 34340503684
            )

        [Vary] => Array
            (
                [0] => Accept-Encoding
            )

        [referrer-policy] => Array
            (
                [0] => origin-when-cross-origin
            )

        [x-frame-options] => Array
            (
                [0] => DENY
            )

        [x-shopid] => Array
            (
                [0] => 34340503684
            )

        [x-shardid] => Array
            (
                [0] => 131
            )

        [x-stats-userid] => Array
            (
                [0] => 
            )

        [x-stats-apiclientid] => Array
            (
                [0] => 104726757377
            )

        [x-stats-apipermissionid] => Array
            (
                [0] => 418311078020
            )

        [x-shopify-api-version] => Array
            (
                [0] => 2023-07
            )

        [x-shopify-api-version-warning] => Array
            (
                [0] => https://shopify.dev/concepts/about-apis/versioning
            )

        [content-language] => Array
            (
                [0] => en
            )

        [x-shopify-api-deprecated-reason] => Array
            (
                [0] => https://shopify.dev/api/usage/versioning#deprecation-practices
            )

        [strict-transport-security] => Array
            (
                [0] => max-age=7889238
            )

        [x-request-id] => Array
            (
                [0] => 2dd1cc4f-9d5c-4c10-90a1-5244b4e39453-1713940962
            )

        [server-timing] => Array
            (
                [0] => processing;dur=123, graphql;desc="admin/query/other"
                [1] => cfRequestDuration;dur=355.000019
            )

        [content-security-policy] => Array
            (
                [0] => default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.shopifycs.com https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=2dd1cc4f-9d5c-4c10-90a1-5244b4e39453-1713940962
            )

        [x-content-type-options] => Array
            (
                [0] => nosniff
            )

        [x-download-options] => Array
            (
                [0] => noopen
            )

        [x-permitted-cross-domain-policies] => Array
            (
                [0] => none
            )

        [x-xss-protection] => Array
            (
                [0] => 1; mode=block; report=/xss-report?source%5Baction%5D=query&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fgraphql&source%5Bsection%5D=admin_api&source%5Buuid%5D=2dd1cc4f-9d5c-4c10-90a1-5244b4e39453-1713940962
            )

        [x-dc] => Array
            (
                [0] => gcp-asia-east2,gcp-us-central1,gcp-us-central1
            )

        [CF-Cache-Status] => Array
            (
                [0] => DYNAMIC
            )

        [Report-To] => Array
            (
                [0] => {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=H01UIeH2dZUEt1Iy2zaRTZ50GFY9VqIrrQe65zmiUG6u5P38qDllPIvFYhag%2B5bpY2oY2tVcsQmnwNr3HbgE7MhuUUj7TbDsu9U11D81Ge6EZFwAZUujsMj%2FLiY3PRkksGjAMFkTRhikWaxS"}],"group":"cf-nel","max_age":604800}
            )

        [NEL] => Array
            (
                [0] => {"success_fraction":0.01,"report_to":"cf-nel","max_age":604800}
            )

        [Server] => Array
            (
                [0] => cloudflare
            )

        [CF-RAY] => Array
            (
                [0] => 87941d66498f04fb-HKG
            )

        [alt-svc] => Array
            (
                [0] => h3=":443"; ma=86400
            )

    )

[headerNames:GuzzleHttp\Psr7\Response:private] => Array
    (
        [date] => Date
        [content-type] => Content-Type
        [transfer-encoding] => Transfer-Encoding
        [connection] => Connection
        [x-sorting-hat-podid] => X-Sorting-Hat-PodId
        [x-sorting-hat-shopid] => X-Sorting-Hat-ShopId
        [vary] => Vary
        [referrer-policy] => referrer-policy
        [x-frame-options] => x-frame-options
        [x-shopid] => x-shopid
        [x-shardid] => x-shardid
        [x-stats-userid] => x-stats-userid
        [x-stats-apiclientid] => x-stats-apiclientid
        [x-stats-apipermissionid] => x-stats-apipermissionid
        [x-shopify-api-version] => x-shopify-api-version
        [x-shopify-api-version-warning] => x-shopify-api-version-warning
        [content-language] => content-language
        [x-shopify-api-deprecated-reason] => x-shopify-api-deprecated-reason
        [strict-transport-security] => strict-transport-security
        [x-request-id] => x-request-id
        [server-timing] => server-timing
        [content-security-policy] => content-security-policy
        [x-content-type-options] => x-content-type-options
        [x-download-options] => x-download-options
        [x-permitted-cross-domain-policies] => x-permitted-cross-domain-policies
        [x-xss-protection] => x-xss-protection
        [x-dc] => x-dc
        [cf-cache-status] => CF-Cache-Status
        [report-to] => Report-To
        [nel] => NEL
        [server] => Server
        [cf-ray] => CF-RAY
        [alt-svc] => alt-svc
    )

[protocol:GuzzleHttp\Psr7\Response:private] => 1.1
[stream:GuzzleHttp\Psr7\Response:private] => GuzzleHttp\Psr7\Stream Object
    (
        [stream:GuzzleHttp\Psr7\Stream:private] => Resource id #423
        [size:GuzzleHttp\Psr7\Stream:private] => 
        [seekable:GuzzleHttp\Psr7\Stream:private] => 1
        [readable:GuzzleHttp\Psr7\Stream:private] => 1
        [writable:GuzzleHttp\Psr7\Stream:private] => 1
        [uri:GuzzleHttp\Psr7\Stream:private] => php://temp
        [customMetadata:GuzzleHttp\Psr7\Stream:private] => Array
            (
            )

    )

)

Tip: include an error message (in a <details></details> tag) if your issue is related to an error

Steps to reproduce the problem

1. 1. 1.

Reduced test case

The best way to get your bug fixed is to provide a reduced test case.


Checklist

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

github-actions[bot] commented 3 months ago

We are closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.

If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines

Thank you!