putyourlightson/open-api — pull request #17 by danherd (2013-10-24 09:54:14+00:00)
Title: Expand file fields

Instead of file fields returning as:

"image": "{filedir_1}image_name.jpg"

They are now returned as:

```
"tr_main_image": {
"file_id": "120",
"site_id": "1",
"title": "image_name.jpg",
"upload_location_id": "1",
"rel_path": "/images/uploads/main_images/image_name.jpg",
"mime_type": "image/jpeg",
"file_name": "image_name.jpg",
"file_size": "1672632",
"description": null,
"credit": null,
"location": null,
"uploaded_by_member_id": "1",
"upload_date": "1382604425",
"modified_by_member_id": "1",
"modified_date": "1382604425",
"file_hw_original": "1728 2304",
"raw_output": "{filedir_1}image_name.jpg",
"path": "http://domain.dev/images/uploads/main_images/",
"extension": "jpg",
"filename": "image_name",
"url": "http://domain.dev/images/uploads/main_images/image_name.jpg",
"width": "2304",
"height": "1728",
"image_pre_format": "",
"image_post_format": "",
"file_pre_format": "",
"file_post_format": "",
"image_properties": "",
"file_properties": "",
"url:list": "http://domain.dev/images/uploads/main_images/_list/image_name.jpg",
"url:slide": "http://domain.dev/images/uploads/main_images/_slide/image_name.jpg",
"url:hero": "http://domain.dev/images/uploads/main_images/_hero/image_name.jpg"
}
```

Sorry about all the whitespace diffs btw - Got ST2 to auto-trim it all on save by default.