photo / openphoto-wordpress

A WordPress plugin for OpenPhoto
http://theopenphotoproject.org
22 stars 8 forks source link

Mixup on the naming of the generate parameter #13

Closed jmathai closed 54 years ago

jmathai commented 12 years ago

Per this thread on issue #8 there's a comment about the generate parameter. While looking at issue #12 I noticed it was named generated and double checked the source. Unsure where the mixup was since I was involved in the conversation and appear to have confirmed that generated is the correct parameter name but I was mistaken.

Here's the commit and source showing it's generate and not generated.

https://github.com/openphoto/frontend/commit/2a950cc98fd4e5d34c7ec4c9380f902f595e9f1d#L0R81

randyhoyt commented 12 years ago

The Twitter conversation that ended here -- https://twitter.com/#!/ezramoore/status/162345686581510144 -- had a user who was using a version of the plugin that had generate=true, and he reported an issue that seemed to like the API was ignoring that flag. When he switched to a version of the plugin that had generated=true, he reported that the issue was resolved.

Questions:

jmathai commented 12 years ago

@randyhoyt not a problem to duplicate the param.

./openphoto -e /photos/list.json -h jmathai.hosted.opme -F 'generate=true' -F 'generated=true' -F 'returnSizes=317x148' -F 'pageSize=1' -p
{
  "message" : "Successfully retrieved user's photos",
  "code" : 200,
  "result" : [
    {
      "id" : "11d",
      "owner" : "jaisen+test@jmathai.com",
      "appId" : "openphoto-frontend",
      "host" : "jmathai.hosted.opme\/photos",
      "title" : null,
      "description" : null,
      "key" : null,
      "hash" : "bbeae56e89d83e4cbe2290c18ee199bfcef5555d",
      "size" : "497",
      "width" : "792",
      "height" : "3336",
      "latitude" : null,
      "longitude" : null,
      "views" : "0",
      "status" : "1",
      "permission" : "1",
      "license" : "",
      "dateTaken" : "1327874834",
      "dateTakenDay" : "29",
      "dateTakenMonth" : "1",
      "dateTakenYear" : "2012",
      "dateUploaded" : "1327874835",
      "dateUploadedDay" : "29",
      "dateUploadedMonth" : "1",
      "dateUploadedYear" : "2012",
      "pathOriginal" : "http:\/\/jmathai.hosted.opme\/photos\/original\/201201\/4f25c3-:tmp:N61fO.jpg",
      "groups" : [

      ],
      "tags" : [
        "2012",
        "January"
      ],
      "path317x148" : "http:\/\/jmathai.hosted.opme\/photos\/custom\/201201\/1327874834-:tmp:N61fO_317x148.jpg",
      "exifCameraMake" : null,
      "exifCameraModel" : null,
      "exifFNumber" : "",
      "exifExposureTime" : null,
      "exifISOSpeed" : null,
      "exifFocalLength" : "",
      "totalRows" : "58",
      "photo317x148" : [
        "http:\/\/jmathai.hosted.opme\/photos\/custom\/201201\/1327874834-:tmp:N61fO_317x148.jpg",
        35,
        148
      ],
      "url" : "http:\/\/jmathai.hosted.opme\/photo\/11d\/view",
      "pageSize" : 1,
      "currentPage" : 1,
      "totalPages" : 58
    }
  ]
}
jmathai commented 12 years ago

Is it possible that some version of the API really has generated in it as the parameter? I'm hesitant to revert it and have it break again for any users.

Looking at the code, no. Specifically not in the versioned tags. But your suggestion of duplicating the param is a good solution. Maybe just put a TODO comment to remove it at a later point with a major version change.

randyhoyt commented 11 years ago

I still have both parameters in place. I added a TODO comment, and I'll remove it at some point in the future.