Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Project Overview

Welcome to SunShot - SolarBook - WordPress API Service Code Challenge! The team at Pick My Solar is taking the next step in solar transparency by developing SolarBook, an online portal covering all things solar for both consumers and industry professionals.

Each stage of the solar process, from first learning what it is and how it works, to what to consider when choosing an installer, to monitoring the system and properly filing for tax credits and rebates, will be covered in educational videos, blogs, workshops, case studies, and quick tips. Quick and to the point, visual learning will accomplish what now takes hours of research and reading. The more informed the consumer, the faster the solar sales process.

Challenge Overview

For this challenge, we would like to create a WP REST API Service that we can install on any wordpress site.

We are currently building an iPhone app that will allow the users of that app to post and retrieve photos, images, and description into a wordpress site via API service.

We can use REST API plugin like https://wordpress.org/plugins/json-rest-api/ or any similar plugin that will serve the purpose.

Important:
- Your code or scripts need to be saved in a separate PHP file that we can easily include in functions.php
You must provide a clear documentation on how to make these request and how to test the service.

We need to have a WordPress service that will have the following task:

1. Create Post
- Post should be saved in “solarbook_story” custom post type.
- Post should be saved with draft status.
- Set the admin as the author of the post.

Here’s the process in creating a post.

First, a user will post the following informations to the service:

- User’s name (can be set as the title of the post, this is required)
Testimonial (can be set as the content of the post, this is required)
User’s profile photo (can be set as featured image, this is required)
3 media fields, each of this field will either hold an image or a video. (3 custom fields, need to have at least 1 media)
System Size (custom field)
Solar Modules (custom field)
Inverter (custom field)
City (custom field)
State (custom field)
Total System Cost (custom field)
Monthly System Cost (custom field)
Old Bill (custom field)
New Bill (custom field)
Solar Company

Second, the user will have an option to post an update to provide an email address (another custom field). So we will need to have a return (post ID) in the 1st step that we can use update the post with additional email address custom field.

2. Pull Post
The following are 3 different service call for different purpose:

2.1. All
- This should return the list of published posts under “solarbook_story” custom post type ordered by the most recent published.
- This call should return the post id, title, excerpt, and featured image url in JSON format.

2.2. Filtered
- This is similar to above call except that the posts are filtered by STATE.

2.3. Details
- This call will take a post id and will return the title, content, featured image, and all the custom fields mentioned above in JSON format.



Final Submission Guidelines

For each member, the final submission should be uploaded via the challenge detail page on topcoder.com.

Below is an overview of the deliverables.  Please check against the challenge scorecard:

- Source code.
- Deployment Guide.
- Any additional scripts to setup/update database structure, configuration, etc.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30051652