Giter Site home page Giter Site logo

proposal for new major about php-sdk HOT 15 CLOSED

eerison avatar eerison commented on July 17, 2024
proposal for new major

from php-sdk.

Comments (15)

tim-kos avatar tim-kos commented on July 17, 2024 1

Hey there,

The form is useful to generate the form for the backend. Regard it as a View helper.

The rest of your list sounds like music in my ears! Would you want to give it a try?

from php-sdk.

eerison avatar eerison commented on July 17, 2024

Ok it's fine

I'll use twig template engine for this then

Could you create a branch 3.x and all new PR you merge to this branch?

Because the new major will be merge to Master like other famus repository

Symfony, laravel, sonata and so on

Please don't merge any new PR to master only to 3.x

from php-sdk.

eerison avatar eerison commented on July 17, 2024

Hey there,

The form is useful to generate the form for the backend. Regard it as a View helper.

The rest of your list sounds like music in my ears! Would you want to give it a try?

Hey @tim-kos this first MR I'll be change the structure, tests and creating few examples

After that I'll do new PRs

  • using github action
  • adding coverage, phpcs and phpmd
  • documentation

Just this first PR will be huge but the others Will be fine to review

from php-sdk.

kvz avatar kvz commented on July 17, 2024

Nice! What about swapping the jquery sdk out for Uppy? We are slowly deprecating the former in favor of the latter

from php-sdk.

eerison avatar eerison commented on July 17, 2024

Nice! What about swapping the jquery sdk out for Uppy? We are slowly deprecating the former in favor of the latter

Hey @kvz

I didn't see this jQuery sdk but I guess make sense, but my idea is removing this jQuery example or js example for next major

Time to time I'm working in this new release 😊

from php-sdk.

tim-kos avatar tim-kos commented on July 17, 2024

Awesome, @eerison !

Indeed swapping out the jQuery SDK (EOL for a long time) for Uppy would be ✨ .

from php-sdk.

eerison avatar eerison commented on July 17, 2024

Hey @tim-kos and @kvz happy new year 🎉

I've tried to create an assembly this way

Request

POST https://api2.transloadit.com/assemblies
Content-Type: application/json
Accept: application/json

{
   "signature":"my_signature",
   "params":{
      "auth":{
         "key":"my_key",
         "expires":"2021/01/21 21:51:27+00:00"
      },
      "template_id":"my_template_id",
      "steps":{
         "screenshot_en":{
            "url":"https://www.google.com"
         },
         "screenshot_pt_BR":{
            "url":"https://www.google.com"
         },
         "store":{
            "credentials":"credentials-staging",
            "url_prefix":"https://localhost",
            "path":"users/87146c666b89aa4ee951d45a13f8074d/curriculum/${file.name}"
         }
      }
   }
}

Response

{
  "error": "INVALID_PARAMS_FIELD",
  "message": "Bad params field provided, it contains invalid json.",
  "http_code": 400
}

But I'm getting this error, what am I doing wrong 😄

from php-sdk.

eerison avatar eerison commented on July 17, 2024

it works doing the request this way

       $response = $this->client->request(
            self::HTTP_METHOD_POST,
            $url,
            [
                'multipart' => [
                    [
                        'name' => 'signature',
                        'contents' => $signature,
                    ],
                    [
                        'name' => 'params',
                        'contents' => $params, #json
                    ]
                ]
            ]
        );

from php-sdk.

kvz avatar kvz commented on July 17, 2024

How is $params constructed? For PHP:

If you use PHP for example, please check the JSON_UNESCAPED_SLASHES option of the json_encode function.

From https://transloadit.com/docs/#example-code-for-different-languages

Also, from the first representation of the request I cannot determine it is a multipart request where all this lives in the transloadit field, correct?

from php-sdk.

eerison avatar eerison commented on July 17, 2024

Hi @kvz you can ignore this comment above.

you can see how this body was mounted here

https://github.com/eerison/php-sdk/blob/7ebb1075693db6456d18aa65ec30bc9351c32253/src/Service/AbstractResourceService.php#L59-L75

How is $params constructed? For PHP:

it's a json, and it's working properly 😃

from php-sdk.

kvz avatar kvz commented on July 17, 2024

Ah okay, everything resolved? good!

from php-sdk.

eerison avatar eerison commented on July 17, 2024

yeah, the integration with lib has worked, But need to be reviewed

PR: #35

please ignore the documentation at the moment I'm thinking to use material for MkDocs + github pages

from php-sdk.

kvz avatar kvz commented on July 17, 2024

Alright, asked Tim to take a look 👌

from php-sdk.

kvz avatar kvz commented on July 17, 2024

@tim-kos

from php-sdk.

eerison avatar eerison commented on July 17, 2024

As this pull request there isn't any feedback, no make sense for me struggle with it anymore.

from php-sdk.

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.