Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1305] Problem with custom object's query in ACS

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionFixed
Resolution Date2015-01-21T01:18:28.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsacs, cloud, customobjects, query
ReporterRodrigo Rosalin Alves Ferreira
AssigneeShuo Liang
Created2015-01-20T11:34:33.000+0000
Updated2016-03-08T07:37:42.000+0000

Description

I use the ACS and I'm in trouble recently to get a custom object that has a photo. The photo attribute always returns null, and I have several applications using the same engine and always worked but recently new applications are with this problem.

Attachments

FileDateSize
mycode.txt2015-01-20T11:34:33.000+0000811

Comments

  1. Wei Kong 2015-01-20

    [~neemo] Can you please provide me your custom object id? and which part of the photo attributes are missing for you?
  2. Rodrigo Rosalin Alves Ferreira 2015-01-21

    I get the photo_id attribute but can not access the photo object itself Result. {"menucategory":[{"user_id":"54bd45f208c91e0942175ad9","photo_id":"54bd46da2ed88cabe3004dbb","created_at":"2015-01-19T18:03:07+0000","updated_at":"2015-01-19T18:03:07+0000","title":"Teste1","id":"54bd46da2ed88cabe3004dba","cname":"menucategory"}],"success":true,"error":false,"meta":{"code":200,"status":"ok","method_name":"queryCustomObjects"}} How can I get to the photo along with the custom object in the query? Thanks
  3. Wei Kong 2015-01-21

    [~neemo] can you please pass in response_json_depth=2 to get the photo object?
  4. Shuo Liang 2015-01-21

    Just run a simple test to get response from customer query, here is the standard structure.
       {
         "meta": {
           "code": 200,
           "status": "ok",
           "method_name": "queryCustomObjects",
           "page": 1,
           "per_page": 10,
           "total_pages": 1,
           "total_results": 1
         },
         "response": {
           "test": [
             {
               "created_at": "2015-01-21T00:43:15+0000",
               "updated_at": "2015-01-21T00:43:15+0000",
               "photo": {
                 "id": "54bef622c069eb7fa500b558",
                 "filename": "testImage.png",
                 "size": 52484,
                 "md5": "5e7438e831ba84297cc0cdecaa8445dd",
                 "created_at": "2015-01-21T00:43:15+0000",
                 "updated_at": "2015-01-21T00:43:15+0000",
                 "processed": true,
                 "urls": {
                   "square_75": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_square_75.png",
                   "thumb_100": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_thumb_100.png",
                   "small_240": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_small_240.png",
                   "medium_500": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_medium_500.png",
                   "medium_640": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_medium_640.png",
                   "large_1024": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_large_1024.png",
                   "original": "https://s3-us-west-1.amazonaws.com/storage.cloud.appcelerator.com/YcweobYn6Sgx1gcZaxx8UdwPpkzF2r3c/photos/45/dd/54bef623c069eb7fa500b559/testImage_original.png"
                 },
                 "content_type": "image/png",
       .
       .
       .
       
  5. Rodrigo Rosalin Alves Ferreira 2015-01-21

    It's worked. Thanks very much Wei Kong

JSON Source