1
0
-1

Hi Richard,

I came through a problem. Could I add basic info and pictures at the same time to a new animal ? 

Because I couldn't find any example about using several API together. 

I can now successfully add an animal with your help.

And another question is that, I saw the fields of addPicture. The picture binary is like "00000111100000...."? And I must input the animalID?

  • animalID: ID (key)
  • pictureBinary: Picture (binary)
  • fileName: File name (string)
  • mediaOrder: Order (int)

Best regards,

Yuxin

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Yuxin,

      Yes, you would need to perform two calls to the API: first to add the animal, second to add a picture.

      Richard

      1. yuxinshi

        1. So you mean that I need to call add first, then call addPicture? But how can I do that without an animalID? Because when I add an animal, I don't add ID to it. How to connect the two api? 

        2. So I can call two api in one script? Like following:

        data1 = array(....) // for "add"

        $ch1 = curl_init();

        curl_close($ch1);

        data2 = array(....) // for "addPicture"

        $ch2 = curl_init();

        curl_close($ch2);

        Thank you so much!

      CommentAdd your comment...