Implemented a working version of XFMG APIs which includes fundamental functionalities.
Implemented actions:
Album:
List
Show
Create
Edit
Delete
Watch (Follow)
Like
Media:
List
Show
Create
Edit
Delete
Watch
Like
Comment:
List
Add
Edit
Delete
Like
Missing important actions:
Album:
Approve
Report
Media:
Move
Edit Image
Change Thumbnail
Edit tags
Approve
Report
Comment:
Report
Concerns:
API response keys do not look like those of other APIs such as /posts, /threads. For example, post_date of posts are mapped to post_create_date in API response data, while comment_date of xfmg comments are mapped to comment_date. I'm not exactly sure what is our mapping convention, and whether XFMG APIs have to follow that convention.
Entity visibility is not properly handled in index actions yet. I.e. they are returning unapproved, ignored, deleted, etc. items. But this will be resolved during the process of implementing 'approve' actions
Media creation action POST /media uses a file param to create an attachment record directly for the new media, while normally a separate POST /attachments call is required. Although this is not similar to other APIs, I implemented this way because a media item always has exactly 1 attachment, and it will be much more convenient to create a media item via API this way
Implemented a working version of XFMG APIs which includes fundamental functionalities.
Implemented actions:
Album:
Media:
Comment:
Missing important actions:
Album:
Media:
Comment:
Concerns:
post_date
of posts are mapped topost_create_date
in API response data, whilecomment_date
of xfmg comments are mapped tocomment_date
. I'm not exactly sure what is our mapping convention, and whether XFMG APIs have to follow that convention.POST /media
uses afile
param to create an attachment record directly for the new media, while normally a separatePOST /attachments
call is required. Although this is not similar to other APIs, I implemented this way because a media item always has exactly 1 attachment, and it will be much more convenient to create a media item via API this way